-
Notifications
You must be signed in to change notification settings - Fork 203
Description
The agent crashed and entered a zombie state after attempting to send a message to Telegram. The system incorrectly interpreted a text string (likely malformed output or a log snippet starting with prefix):) as a file path and attempted to open() it for upload. The resulting error was not handled gracefully, causing the agent's goroutine to panic or terminate unexpectedly.
Logs:
time=2026-03-02T12:23:39.304+07:00 level=ERROR msg="error sending message to channel" channel=telegram error="open document prefix): open prefix): no such file or directory" time=2026-03-02T12:25:04.670+07:00 level=WARN msg="inbound: agent not found" agent=default channel=telegram
Root Cause:
• The Telegram output adapter likely lacks validation for file_path before attempting os.Open().
• Error handling for file opening is insufficient, leading to a crash of the agent loop instead of a simple error log/reply.
Proposed Solution:
- Validate that the string looks like a valid file path before calling os.Open().
- Wrap the file upload logic in a recover() block or robust error handling.
- If os.Open() fails, fallback to sending the content as a text message instead of crashing.