Problem
When context auto-compaction runs on Telegram or Discord, the bot appears completely frozen for 10-30 seconds with no visual feedback. Users have no way to tell if the bot is still working or has crashed.
Current behavior
- User sends a message in a long conversation
- Auto-compaction triggers (compressing conversation history)
- Bot shows no status change — the last reaction (e.g.
🤔 thinking) stays frozen
- After 10-30s, the bot suddenly responds
This is especially confusing on Telegram where the 🤔 reaction just sits there unchanged.
Expected behavior
The bot should show a distinct status reaction during compaction (e.g. ✍ writing) so users know it's actively working on organizing context, not hung.
Context
The building blocks already exist:
- Compaction events are already emitted via
onAgentEvent (stream: "compaction", phase: "start"/"end")
- StatusReactionController already manages emoji lifecycle with debounce, stall detection, and serialized transitions
- These two systems just aren't connected
Proposed fix
PR #35474 bridges the gap by:
- Adding a
compacting state to StatusReactionController
- Wiring the existing compaction events to the status reaction system
- Showing
✍ during compaction, then resuming 🤔 when done
- Works on both Telegram and Discord
~39 lines of production code, follows existing patterns exactly.
Problem
When context auto-compaction runs on Telegram or Discord, the bot appears completely frozen for 10-30 seconds with no visual feedback. Users have no way to tell if the bot is still working or has crashed.
Current behavior
🤔thinking) stays frozenThis is especially confusing on Telegram where the
🤔reaction just sits there unchanged.Expected behavior
The bot should show a distinct status reaction during compaction (e.g.
✍writing) so users know it's actively working on organizing context, not hung.Context
The building blocks already exist:
onAgentEvent(stream: "compaction",phase: "start"/"end")Proposed fix
PR #35474 bridges the gap by:
compactingstate toStatusReactionController✍during compaction, then resuming🤔when done~39 lines of production code, follows existing patterns exactly.