Problem
The on_compaction callback in AgentCallbacks is set to None when the agent is created in the TUI. When context compaction triggers (silently dropping older messages), the user has no indication that it happened.
Expected Behavior
The TUI should show a status message or indicator when compaction occurs, e.g.:
- A system message: "Context compacted: summarized N older messages"
- A brief status bar notification
Proposed Approach
- In
App::set_provider() where callbacks are built, set on_compaction to a closure that:
- Sends a system message to the TUI message list when compaction starts
- Optionally shows the summary that was generated
- The callback signature is
on_compaction(bool) where true = starting, false = finished
Related
PR #261 — Wire config options, context compaction, and auto-index on startup
Problem
The
on_compactioncallback inAgentCallbacksis set toNonewhen the agent is created in the TUI. When context compaction triggers (silently dropping older messages), the user has no indication that it happened.Expected Behavior
The TUI should show a status message or indicator when compaction occurs, e.g.:
Proposed Approach
App::set_provider()where callbacks are built, seton_compactionto a closure that:on_compaction(bool)wheretrue= starting,false= finishedRelated
PR #261 — Wire config options, context compaction, and auto-index on startup