Skip to content

[FEATURE]: TUI option to hide compaction summaries from the transcript #56435

Open

Description

@lripollmor

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Problem

After an automatic (or manual) compaction, the full compaction summary is rendered inline in the session transcript: Objective, Important Details, Work State, Next Move, Relevant Files, etc.

In a long session that compacts several times, these blocks dominate the transcript. From the user's point of view they interrupt the flow of the actually useful messages (user turns, assistant answers, tool calls and their output) and repeat information that was already in that same conversation, so they add no new information at the point where they are displayed.

Requested enhancement

Add a client-side presentation option to not display the compaction message in the transcript, for example in ~/.config/opencode/cli.json:

{
  "$schema": "https://opencode.ai/v2/cli.json",
  "session": {
    // "hidden" | "summary" (today's behavior) | "header" (one-line marker, no body)
    "compaction": "hidden"
  }
}

or the equivalent boolean form (session.show_compaction: false). Default behavior must stay exactly as it is today.

Suggested granularity, in order of preference:

  1. Hide the whole compaction transcript item.
  2. Keep a one-line marker (e.g. — compacted —) but hide the summary body, so the user still knows a compaction happened at that point.

Scope (important)

This is a presentation-only request:

  • Compaction behavior, thresholds and settings stay unchanged.
  • The persisted Session.Message.Compaction message stays unchanged.
  • The model's context is unchanged: the summary must still be sent to the model.
  • The summary must remain obtainable/inspectable by other means (expanding it, /btw, an API read, or the session data), so nothing is lost when hidden.

Why not a plugin

This cannot be solved by a plugin today. The TUI slot tree published by @opencode/plugin 2.0.32 is a closed set (SlotMap) and none of its paths covers the transcript:

app, home.footer, home.footer.status, prompt.footer, prompt.footer.status, prompt.footer.file, session.composer.top, session.panel, sidebar.content, sidebar.footer.

Server-side hooks do not help either: ctx.session.hook("compaction", …) runs before the summary is recorded and can only replace the summary content (event.result), which changes what the model sees — not what the transcript shows.

Relationship to #48596

#48596 ([Feature]: Make Compaction Summary Collapsible by Default) asks for the summary to be collapsed by default with an expand toggle. This request is narrower and stronger: an explicit option to not render it, for users who do not want it in the transcript at all. If #48596 is implemented as a general presentation control, this could simply be one of its values (hidden / collapsed / full).

What I verified before filing (i.e. no such option exists today)

  • cli.json (schema https://opencode.ai/v2/cli.json) exposes only session.sidebar, scrollbar, thinking, grouping, verbosity, image_preview, tps, markdown, new_location, permissions. Nothing about compaction visibility.
  • Keybinds: there is no binding for it. Closest are session.compact (trigger a compaction) and session.verbosity.cycle.
  • opencode.json: the compaction object only has auto, keep.tokens and buffer (the rest are deprecated V1 fields).
  • Session.Message.Compaction.Completed (OpenAPI) has type, id, metadata, time, status, reason, model, providerState, summary, recent, providerContext, cost, tokens — no visibility/presentation flag.

Environment

  • opencode version: 2.0.32
  • OS: Windows 11 (Windows_NT 10.0.26200, win32 x64)
  • Terminal: TERM=xterm-256color, TERM_PROGRAM unset
  • Shell: C:\WINDOWS\system32\cmd.exe
  • Install/channel: npm global install (@opencode/cli), latest channel
  • Active plugins: none (only an MCP server is configured)

Reproduction

  1. Open a long session until automatic compaction triggers (or run the "Compact the session" command / session.compact).
  2. Watch the transcript.
  3. The full compaction summary is printed inline as a normal transcript item, between the surrounding messages.

Expected Behavior

The transcript shows only the conversation and tool activity, or at most a one-line marker, when the new option is enabled.

Actual Behavior

The complete compaction summary block is always rendered inline; there is no setting, keybind or plugin slot to avoid it.

Additional Context

Workarounds tried:

  • session.verbosity: "low" — reduces general transcript noise (tools/thoughts grouping) but does not affect the compaction block.
  • compaction.auto: false — makes compaction happen only on demand, so the block appears only when expected, but it still appears in full.
  • Plugin approach — not possible, see the slot list above.

Frequency: consistent; it happens on every compaction.

Activity

  1. opencode-agent commented on Oct 17, 2026

    @opencode-agent
    Contributor

    Thanks for the detailed request and for checking the existing options first.

    You're asking for a presentation-only TUI setting (for example session.compaction: "hidden" | "header" | "summary" in cli.json) that hides compaction summaries in the transcript or shrinks them to a one-line marker. The summary would still be stored and sent to the model, and the default would stay as it is today. I agree it can't be done with a plugin right now: none of the TUI plugin slots reach the transcript, and the compaction hook only changes what the model sees.

    Related issues:

    Maintainers will consider this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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