anomalyco / anomalyco/opencode
[Feature]: Make Compaction Summary Collapsible by Default
@Brendonovich is already working on this.
Since Sep 12, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
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.
https://github.com/user-attachments/assets/1baddf2e-0094-402b-941b-a06f33964e7e
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.