Files
lettabot/src
Cameron 4258e92c50 fix: auto-reset conversation when stream receives no data (#142)
When a conversation has a stuck tool approval from a previous session,
the stream receives NO data at all (not even init). This leaves users
stuck with "(No response from agent)" and no clear path to recovery.

Changes:
- Track if stream received ANY data (not just assistant messages)
- If stream times out with zero data, assume stuck approval state
- Auto-reset conversation and notify user to try again
- Add message type counts to "no response" logs for debugging
- Fix 'system' -> 'init' type comparison (was causing TS error)

This addresses the issue reported by Signo on Discord where responses
were going to ADE instead of the channel due to stuck approvals.

Related issues: #125, #127, #132

Written by Cameron ◯ Letta Code

"When the stream runs dry, dig a new well." - Infrastructure proverb
2026-02-04 15:27:25 -08:00
..