Skip to content

Collapse compaction summary by default in interactive sessions #2858

@yzeng58

Description

@yzeng58

Summary

After auto-compaction, the full compaction summary (overview + history + work_done + technical_details + ...) is always rendered in full in the terminal. For long sessions this can be hundreds of lines of dense XML-like text that pushes everything else off-screen, even though the user never asked to see it.

Current behavior

● Compaction completed

  <overview>
  ... (long paragraph) ...
  </overview>

  <history>
  1. ...
  2. ...
  ...
  </history>

  <work_done>
  ...
  </work_done>

  <technical_details>
  ...
  </technical_details>

  <important_files>
  ...
  </important_files>

  <next_steps>
  ...
  </next_steps>

This dump appears every time the agent triggers a /compact automatically. There is currently no flag, config option, or keybinding to suppress or fold it.

Proposed behavior

Show a single collapsed line by default:

● Compaction completed (saved ~12.3k tokens) — press space / e to expand

The full summary is preserved internally (so the agent still uses it as context), but the terminal output is one line unless the user opts in.

Why

  • The summary is for the agent's memory, not for the human reader. Almost no one reads it line-by-line.
  • For long-running sessions on large codebases, compactions happen repeatedly and each one walls off prior conversation.
  • Existing precedent: tool call output and reasoning blocks already have collapse/toggle behavior (Ctrl+T). Compaction summaries should behave the same way.

Alternatives considered

  • Ctrl+L to clear screen — works but loses everything, not just the summary
  • Pipe | grep -v — doesn't apply to interactive sessions
  • Manual /clear — destroys context, defeats the purpose of compaction

Versions

  • copilot CLI: 1.0.33
  • macOS / Ghostty terminal

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:context-memoryContext window, memory, compaction, checkpoints, and instruction loadingarea:terminal-renderingDisplay and rendering: flickering, scrolling, line wrapping, output formatting
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions