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
[Bug]: Auto-compaction fails with "OpenCode's free tier can only be used from within OpenCode" on OpenCode Zen #49587
When auto-approve permissions is enabled and the context window triggers an automatic compaction, the process fails with a provider error specifically when using free tier models (e.g., Big Pickle, MiMo V2.5) via OpenCode Zen.
The error displayed is: Error from provider (Console): OpenCode's free tier can only be used from within OpenCode
This issue appears to be a regression or a recent backend validation issue. Manual compaction using the /compact command works perfectly fine, which indicates the problem is isolated to the automatic compaction mechanism. It seems the internal API call for auto-compaction is failing to send the required x-opencode-session header (or is sending it in an invalid format), causing the OpenCode Zen backend to reject it as if it were an external client.
Plugins
None
OpenCode version
1.18.31
Steps to reproduce
Open the OpenCode TUI.
Select a free tier model (e.g., Big Pickle or MiMo V2.5).
Enable auto-approve permissions in the settings.
Continue a conversation until the context window reaches the threshold that triggers an automatic compaction.
Your issue specifically identifies auto-compaction as the trigger (while manual /compact works), which may be a distinct root cause worth tracking separately. If the linked issues don't address the auto-compaction angle, feel free to keep this open.
When auto-approve permissions is enabled and the context window triggers an automatic compaction, the process fails with a provider error specifically when using free tier models (e.g., Big Pickle, MiMo V2.5) via OpenCode Zen.
The error displayed is: Error from provider (Console): OpenCode's free tier can only be used from within OpenCode
This issue appears to be a regression or a recent backend validation issue. Manual compaction using the /compact command works perfectly fine, which indicates the problem is isolated to the automatic compaction mechanism. It seems the internal API call for auto-compaction is failing to send the required x-opencode-session header (or is sending it in an invalid format), causing the OpenCode Zen backend to reject it as if it were an external client.
same error for Big Pickle, MiMo V2.5 Free and Nemotron 3 Ultra Free : Error from provider (Console): OpenCode's free tier can only be used from within OpenCode.
I'm experiencing exactly the same issue on the official OpenCode Desktop app (Windows). I also opened a separate issue (#49590) with the same error.
It looks like multiple users across Windows and macOS are hitting this at the same time, so this may be a broader free-tier validation issue rather than a platform-specific problem.
We've been tightening our logic to fight abuse, we did temporarily have an issue where compaction was impacted and marked as not from OpenCode it has been resolved. You cannot use the free tier in other harnesses (this is only a limitation for the free tier nothing else). The logic in place may not work properly if you have a very custom setup. If that is the case can you tell us more about your setup?
14. Guys, I found a solution that fixes the issue. I know it’s not the best solution, but it works correctly for me.
Just downgrade OpenCode to version 1.18.28: npm uninstall -g opencode-ai
```
npm install -g opencode-ai@1.18.28
```
After that, restart OpenCode and the free tier should work again.
Hope this helps someone!)
Activity
github-actions commentedon Sep 17, 2026
This issue might be a duplicate of existing issues. Please check:
Your issue specifically identifies auto-compaction as the trigger (while manual
/compactworks), which may be a distinct root cause worth tracking separately. If the linked issues don't address the auto-compaction angle, feel free to keep this open.Gui8092 commentedon Sep 17, 2026
PLEASE NOTE: The whole chat is in Portuguese (pt-BR)
I was working on a simple Minecraft Bedrock Resource Pack (aiming to improve lighting, fog, and PBR effects) when I encountered this bug.
You can find my session link below to see the full context of what I was doing:
https://opncd.ai/share/rdKUQ4ME
When auto-approve permissions is enabled and the context window triggers an automatic compaction, the process fails with a provider error specifically when using free tier models (e.g., Big Pickle, MiMo V2.5) via OpenCode Zen.
The error displayed is:
Error from provider (Console): OpenCode's free tier can only be used from within OpenCodeThis issue appears to be a regression or a recent backend validation issue. Manual compaction using the
/compactcommand works perfectly fine, which indicates the problem is isolated to the automatic compaction mechanism. It seems the internal API call for auto-compaction is failing to send the requiredx-opencode-sessionheader (or is sending it in an invalid format), causing the OpenCode Zen backend to reject it as if it were an external client.Cuphead74832 commentedon Sep 17, 2026
Yeah opencode is down, same issue here.
troikoss commentedon Sep 17, 2026
same issue, even the manual /compact command doesnt work
novasec81-creator commentedon Sep 17, 2026
same error for Big Pickle, MiMo V2.5 Free and Nemotron 3 Ultra Free : Error from provider (Console): OpenCode's free tier can only be used from within OpenCode.
onelpawarai-X commentedon Sep 17, 2026
I'm experiencing exactly the same issue on the official OpenCode Desktop app (Windows). I also opened a separate issue (#49590) with the same error.
It looks like multiple users across Windows and macOS are hitting this at the same time, so this may be a broader free-tier validation issue rather than a platform-specific problem.
soulinker commentedon Sep 17, 2026
happens only during compaction
karokarok commentedon Sep 17, 2026
wtf is going on in opencode they seem to ignore this issue.
HafizAhmadJamil commentedon Sep 17, 2026
Same issue on ubuntu
zenviko commentedon Sep 17, 2026
Guys, I found a solution that fixes the issue. I know it’s not the best solution, but it works correctly for me.
Just downgrade OpenCode to version 1.18.28:
After that, restart OpenCode and the free tier should work again.
Hope this helps someone!)
rekram1-node commentedon Sep 18, 2026
We've been tightening our logic to fight abuse, we did temporarily have an issue where compaction was impacted and marked as not from OpenCode it has been resolved. You cannot use the free tier in other harnesses (this is only a limitation for the free tier nothing else). The logic in place may not work properly if you have a very custom setup. If that is the case can you tell us more about your setup?
opencode: keep the native bash tool listed and block it in the gate p…
paulpas commentedon Oct 12, 2026
Sadly this did not work for me.