Compaction Simulator #7495

Open
opened 2026-02-16 18:07:21 -05:00 by yindo · 1 comment
Owner

Originally created by @victorhramos-dev on GitHub (Jan 24, 2026).

Originally assigned to: @rekram1-node on GitHub.

Question

How to avoid Opencode turning into Compaction Simulator?
I plan some tasks then opencode starts to code and at some point he becomes a compaction simulator like this:

Agent: {show the plan} do something and do the compaction
Me: continue
Agent: ok, the user said to me continue -> read a file -> compaction and stops again
Me: continue
Agente: ok, the user said to me continue -> read another file -> compact and stops again
...

Originally created by @victorhramos-dev on GitHub (Jan 24, 2026). Originally assigned to: @rekram1-node on GitHub. ### Question How to avoid Opencode turning into Compaction Simulator? I plan some tasks then opencode starts to code and at some point he becomes a compaction simulator like this: Agent: {show the plan} do something and do the compaction Me: continue Agent: ok, the user said to me continue -> read a file -> compaction and stops again Me: continue Agente: ok, the user said to me continue -> read another file -> compact and stops again ...
Author
Owner

@github-actions[bot] commented on GitHub (Jan 24, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #6286: Compaction Failing to Run on Time - Similar issue where compaction doesn't trigger reliably and causes context problems
  • #8089: Auto-compaction enabled by default, but context_length_exceeded errors still occur in agent workflows - Discusses compaction not working properly in agent workflows
  • #10017: Feature Request: Custom compaction threshold to trigger earlier - Related feature request about compaction triggering too late
  • #6068: [BUG]: Auto compaction not triggering reliably with Anthropic models - Reports auto-compaction not triggering as expected
  • #8932: [FEATURE]: Allow pinning important instructions/messages per session to keep them after compaction - Suggests improvements to handle compaction better in long workflows
  • #5934: Session Todo-list is forgotten after compaction - Reports context loss after compaction events

The core issue appears to be that auto-compaction is being triggered too frequently during agent execution, causing the agent to halt and wait for continuation instead of running autonomously. This differs from traditional compaction bugs in that it's about compaction triggering at inopportune times rather than failing to trigger.

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 24, 2026): This issue might be a duplicate of existing issues. Please check: - #6286: Compaction Failing to Run on Time - Similar issue where compaction doesn't trigger reliably and causes context problems - #8089: Auto-compaction enabled by default, but context_length_exceeded errors still occur in agent workflows - Discusses compaction not working properly in agent workflows - #10017: Feature Request: Custom compaction threshold to trigger earlier - Related feature request about compaction triggering too late - #6068: [BUG]: Auto compaction not triggering reliably with Anthropic models - Reports auto-compaction not triggering as expected - #8932: [FEATURE]: Allow pinning important instructions/messages per session to keep them after compaction - Suggests improvements to handle compaction better in long workflows - #5934: Session Todo-list is forgotten after compaction - Reports context loss after compaction events The core issue appears to be that auto-compaction is being triggered too frequently during agent execution, causing the agent to halt and wait for continuation instead of running autonomously. This differs from traditional compaction bugs in that it's about compaction triggering at inopportune times rather than failing to trigger. Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7495