Repository navigation
Description
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:
- Hide the whole compaction transcript item.
- 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.Compactionmessage 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(schemahttps://opencode.ai/v2/cli.json) exposes onlysession.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) andsession.verbosity.cycle. opencode.json: thecompactionobject only hasauto,keep.tokensandbuffer(the rest are deprecated V1 fields).Session.Message.Compaction.Completed(OpenAPI) hastype,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_PROGRAMunset - 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
- Open a long session until automatic compaction triggers (or run the "Compact the session" command /
session.compact). - Watch the transcript.
- 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
opencode-agent commentedon Oct 17, 2026
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"incli.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 thecompactionhook only changes what the model sees.Related issues:
Maintainers will consider this.