Skip to content

UX: no feedback during context auto-compaction (10-30s freeze) #35545

@Cypherm

Description

@Cypherm

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

  1. User sends a message in a long conversation
  2. Auto-compaction triggers (compressing conversation history)
  3. Bot shows no status change — the last reaction (e.g. 🤔 thinking) stays frozen
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions