Skip to content

on_compaction callback is None — no visual feedback during context compaction #264

@laynepenney

Description

@laynepenney

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

  1. 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
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions