config not work(feature compact) #6756

Open
opened 2026-02-16 18:05:10 -05:00 by yindo · 10 comments
Owner

Originally created by @DevSissi on GitHub (Jan 19, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

Image I have configured the compaction parameters in the config, but OpenCode still automatically triggers compaction when the context reaches around 80%.

Auto-compaction has never worked properly on my end. Once the automatic compaction is triggered, the conversation can no longer continue.

Plugins

oh my opencode

OpenCode version

1.1.25

Steps to reproduce

use claude model
talk unitl context limit to 80%
opencode will auto compact the session

Screenshot and/or share link

Image Image

Operating System

Win11

Terminal

Win Terminal

Originally created by @DevSissi on GitHub (Jan 19, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description <img width="763" height="266" alt="Image" src="https://github.com/user-attachments/assets/df46b577-8285-48be-840f-6d258a899675" /> I have configured the compaction parameters in the config, but OpenCode still automatically triggers compaction when the context reaches around 80%. Auto-compaction has never worked properly on my end. Once the automatic compaction is triggered, the conversation can no longer continue. ### Plugins oh my opencode ### OpenCode version 1.1.25 ### Steps to reproduce use claude model talk unitl context limit to 80% opencode will auto compact the session ### Screenshot and/or share link <img width="2952" height="354" alt="Image" src="https://github.com/user-attachments/assets/411d7070-c365-4fcf-b156-b34a91de778c" /> <img width="1738" height="291" alt="Image" src="https://github.com/user-attachments/assets/875e12de-f047-497b-a3e0-48145356327e" /> ### Operating System Win11 ### Terminal Win Terminal
yindo added the windowsbug labels 2026-02-16 18:05:10 -05:00
Author
Owner

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

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

  • #8089: Auto-compaction enabled by default, but context_length_exceeded errors still occur
  • #6068: Auto compaction not triggering reliably with Anthropic models
  • #8394: Compaction fails and agent forgets everything
  • #6286: Compaction failing to run on time
  • #8140: Configurable context limit and auto-compaction threshold (feature request)
  • #8726: Stuck at 'prompt is too long' after compaction failure
  • #8629: Configuration options for automatic compaction inadequate
  • #5934: Session todo-list forgotten after compaction
  • #2234: Compact causes LLM to forget conversation
  • #2945: Session automatically compacted, destroying working context
  • #6535: Auto-compaction causes loss of original context and system prompt
  • #8349: Configuration (model/agent selection) lost after compaction

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

@github-actions[bot] commented on GitHub (Jan 19, 2026): This issue might be a duplicate of existing issues. Please check: - #8089: Auto-compaction enabled by default, but context_length_exceeded errors still occur - #6068: Auto compaction not triggering reliably with Anthropic models - #8394: Compaction fails and agent forgets everything - #6286: Compaction failing to run on time - #8140: Configurable context limit and auto-compaction threshold (feature request) - #8726: Stuck at 'prompt is too long' after compaction failure - #8629: Configuration options for automatic compaction inadequate - #5934: Session todo-list forgotten after compaction - #2234: Compact causes LLM to forget conversation - #2945: Session automatically compacted, destroying working context - #6535: Auto-compaction causes loss of original context and system prompt - #8349: Configuration (model/agent selection) lost after compaction Feel free to ignore if none of these address your specific case.
Author
Owner

@DevSissi commented on GitHub (Jan 20, 2026):

Is there a way to fix it?

@DevSissi commented on GitHub (Jan 20, 2026): Is there a way to fix it?
Author
Owner

@juanibiapina commented on GitHub (Jan 20, 2026):

I have the same bug. Disabling compaction in the config doesn't disable it.

@juanibiapina commented on GitHub (Jan 20, 2026): I have the same bug. Disabling compaction in the config doesn't disable it.
Author
Owner

@cravenceiling commented on GitHub (Jan 20, 2026):

Mm... It might be an issue with oh-my-opencode? @juanibiapina are you also using OMO?

There's a related issue: https://github.com/code-yeongyu/oh-my-opencode/issues/555#issuecomment-3717116883

...
The REAL problem: oh-my-opencode implements its own comprehensive DCP (Dynamic Context Pruning) and compaction system that conflicts with external opencode-elf and opencode-dcp plugins:

Oh-my-opencode's built-in features (all enabled by default):

preemptive-compaction - Proactive compaction at 85% context window
anthropic-context-window-limit-recovery - Auto-compaction on token limits
compaction-context-injector - Context preservation during compaction
context-window-monitor - Real-time context usage monitoring
Optional DCP via experimental.dcp_for_compaction
...

@cravenceiling commented on GitHub (Jan 20, 2026): Mm... It might be an issue with `oh-my-opencode`? @juanibiapina are you also using OMO? There's a related issue: https://github.com/code-yeongyu/oh-my-opencode/issues/555#issuecomment-3717116883 > ... > The REAL problem: oh-my-opencode implements its own comprehensive DCP (Dynamic Context Pruning) and compaction system that conflicts with external opencode-elf and opencode-dcp plugins: > > Oh-my-opencode's built-in features (all enabled by default): > > preemptive-compaction - Proactive compaction at 85% context window > anthropic-context-window-limit-recovery - Auto-compaction on token limits > compaction-context-injector - Context preservation during compaction > context-window-monitor - Real-time context usage monitoring > Optional DCP via `experimental.dcp_for_compaction` > ...
Author
Owner

@lee-b commented on GitHub (Jan 20, 2026):

Mm... It might be an issue with oh-my-opencode? @juanibiapina are you also using OMO?

There's a related issue: code-yeongyu/oh-my-opencode#555 (comment)

...
The REAL problem: oh-my-opencode implements its own comprehensive DCP (Dynamic Context Pruning) and compaction system that conflicts with external opencode-elf and opencode-dcp plugins:
Oh-my-opencode's built-in features (all enabled by default):
preemptive-compaction - Proactive compaction at 85% context window
anthropic-context-window-limit-recovery - Auto-compaction on token limits
compaction-context-injector - Context preservation during compaction
context-window-monitor - Real-time context usage monitoring
Optional DCP via experimental.dcp_for_compaction
...

No, seeing it here too, with none of those addons.

@lee-b commented on GitHub (Jan 20, 2026): > Mm... It might be an issue with `oh-my-opencode`? [@juanibiapina](https://github.com/juanibiapina) are you also using OMO? > > There's a related issue: [code-yeongyu/oh-my-opencode#555 (comment)](https://github.com/code-yeongyu/oh-my-opencode/issues/555#issuecomment-3717116883) > > > ... > > The REAL problem: oh-my-opencode implements its own comprehensive DCP (Dynamic Context Pruning) and compaction system that conflicts with external opencode-elf and opencode-dcp plugins: > > Oh-my-opencode's built-in features (all enabled by default): > > preemptive-compaction - Proactive compaction at 85% context window > > anthropic-context-window-limit-recovery - Auto-compaction on token limits > > compaction-context-injector - Context preservation during compaction > > context-window-monitor - Real-time context usage monitoring > > Optional DCP via `experimental.dcp_for_compaction` > > ... No, seeing it here too, with none of those addons.
Author
Owner

@juanibiapina commented on GitHub (Jan 20, 2026):

No I don't use that.

@juanibiapina commented on GitHub (Jan 20, 2026): No I don't use that.
Author
Owner

@cravenceiling commented on GitHub (Jan 20, 2026):

What config and model are you using? Does the output of opencode debug config contain "compaction": { "auto": false}?

@cravenceiling commented on GitHub (Jan 20, 2026): What config and model are you using? Does the output of `opencode debug config` contain `"compaction": { "auto": false}`?
Author
Owner

@juanibiapina commented on GitHub (Jan 20, 2026):

Ok so now it worked. Sorry I don't know what I did. It's possible I was using a version that was open for a few days, before I set the config.

@juanibiapina commented on GitHub (Jan 20, 2026): Ok so now it worked. Sorry I don't know what I did. It's possible I was using a version that was open for a few days, before I set the config.
Author
Owner

@rekram1-node commented on GitHub (Jan 20, 2026):

What provider is being used here because I havent seen this error before I suspect it being a plugin

@rekram1-node commented on GitHub (Jan 20, 2026): What provider is being used here because I havent seen this error before I suspect it being a plugin
Author
Owner

@DevSissi commented on GitHub (Jan 25, 2026):

i using the omo,but i also cant find the source of problem

@DevSissi commented on GitHub (Jan 25, 2026): i using the omo,but i also cant find the source of problem
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6756