You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
compaction.auto=false ignored: isOverflow called without cfg parameter #20249
compaction.auto: false in opencode.json is ignored. Auto-compaction still triggers.
Root Cause
In packages/opencode/src/session/prompt.ts, isOverflow is called without the cfg parameter:
// prompt.ts line ~549if(lastFinished&&lastFinished.summary!==true&&(awaitSessionCompaction.isOverflow({tokens: lastFinished.tokens, model }))){
But isOverflow in compaction.ts expects input.cfg:
exportasyncfunctionisOverflow(input: {tokens: MessageV2.Assistant["tokens"];model: Provider.Model}){constconfig=awaitConfig.get()if(config.compaction?.auto===false)returnfalse// <-- cfg not in input
Wait — actually isOverflow calls Config.get() internally, so it should work regardless. Let me re-check...
Environment
OpenCode version: 1.3.9
OS: Linux
Model: groq/llama-3.1-8b-instant (but likely affects all models)
Steps to Reproduce
Add "compaction": { "auto": false } to opencode.json
Start a new session with any model
Send a message — compaction still triggers
Additional Context
The issue is especially visible with Groq models because Groq returns tokens: {input:0, output:0} in streaming responses, causing the compaction loop to never resolve. But compaction.auto: false should prevent this regardless of the model.
Activity
github-actions commentedon Mar 31, 2026
This issue might be a duplicate of existing issues. Please check:
compaction.auto: falsebeing ignored, with detailed analysis of the code path involved