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
Feature Request: Make Compaction Summary Collapsible by Default
Problem
After a session is automatically compacted, OpenCode displays a full compaction summary directly in the conversation.
The summary contains sections such as:
- Objective
- Important Details
- Work State
- Next Move
- Relevant Files
These summaries can become quite large, especially during long development sessions where compaction happens multiple times.
The information is useful, but displaying the entire summary inline every time takes up a significant amount of vertical space and makes it harder to navigate the actual conversation, tool calls, and code changes.
Proposed Solution
Keep the existing compaction summary generation and content exactly as it is, but change its default UI presentation:
- Compaction summaries should be collapsed by default.
- Display a compact header indicating that a compaction summary was generated.
- Allow the user to click the header to expand/collapse the full summary.
- Preserve the complete summary and all existing information when expanded.
- The collapsed state should only affect the visual presentation, not the underlying session context or compaction behavior.
Conceptually:
▶ Compaction Summary
Clicking it:
▼ Compaction Summary
Objective
...
Important Details
...
Work State
...
Next Move
...
Relevant Files
...
Why This Is Different From Hiding Compaction
This proposal is not asking to:
- remove compaction summaries;
- disable automatic compaction;
- make compaction silent;
- change the compaction algorithm;
- reduce the information generated by the model;
- change what is included in the model’s context.
The summary should remain fully available and unchanged.
This is specifically a conversation UI presentation improvement: the information is available when needed, but does not occupy a large amount of screen space by default.
Expected Result
For normal use, a long conversation would remain visually compact after compaction:
User message
Assistant response
Tool output
Tool output
▶ Compaction Summary
User message
Assistant response
...
Users who want to inspect what was preserved during compaction can simply click the summary to expand it.
The desired result is to implement the same collapsed/expanded interaction shown in the attached video.
Activity
github-actions commentedon Sep 12, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
[FEATURE]:(e.g.[FEATURE]: Make Compaction Summary Collapsible by Default)Please edit this issue to address the above within 2 hours, or it will be automatically closed.
For reference, a related (but closed) issue on collapsible UI for a different summary type: #15257 — [FEATURE]: Collapsible reasoning summaries. Your request is distinct (compaction summaries vs. reasoning summaries), but worth reviewing for context.
If you believe this was flagged incorrectly, please let a maintainer know.
[-]Make Compaction Summary Collapsible by Default[/-][+][Feature]: Make Compaction Summary Collapsible by Default[/+]github-actions commentedon Sep 12, 2026
Thank you for updating your issue! It now meets our contributing guidelines. We appreciate the clear description and the video demonstration.
opencodejr commentedon Oct 28, 2026
Thanks for the clear write-up and the video!
You're asking for compaction summaries to be collapsed to a one-line header by default and opened with a click. The summary itself, what the model sees and how compaction works would stay the same.
This can't be done with a plugin right now, because plugins can't change how the transcript is displayed. Some related work is already in progress:
session.compactionsetting, and adds the same collapse to the desktop app. This is very close to what you describe.Maintainers will consider this.
zhejingxu commentedon Nov 3, 2026
I have this working on current
dev(3ba597f) for both desktop and TUI. It's close to #58162, but that PR is a draft and now conflicts withdev.experimental.background_compactionoff now show one collapsible row. While running it says "Compacting" plus the current summary heading. When done it shows the outcome and token usage. Click to open the summary. Errors stay visible. The quiet divider from feat(session-ui): quiet divider for automatic compaction with background compaction on #58996 is unchanged.+/−toggle and starts collapsed. Failures stay open.Patch: https://github.com/zhejingxu/opencode-plugins/blob/main/upstream/collapse-compaction.patch
Four component tests in
session-compaction.spec.tscurrently assert "keeps the full record", so I'd like a maintainer to confirm the behavior first. I'm also happy to help get #58162 rebased instead if that's the preferred route.