Skip to content

[Bug]: Auto-compaction fails with "OpenCode's free tier can only be used from within OpenCode" on OpenCode Zen #49587

Closed as duplicate

Description

@Gui8092

Description

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

  1. Open the OpenCode TUI.
  2. Select a free tier model (e.g., Big Pickle or MiMo V2.5).
  3. Enable auto-approve permissions in the settings.
  4. Continue a conversation until the context window reaches the threshold that triggers an automatic compaction.
  5. Observe the provider error.

Screenshot and/or share link

Image Image

Operating System

Windows 10 (version 10.0.19045)

Terminal

Windows Terminal (Command Prompt)

Activity

  1. github-actions commented on Sep 17, 2026

    @github-actions
    Contributor

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

    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.

  2. Gui8092 commented on Sep 17, 2026

    @Gui8092
    Author

    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 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.

  3. Cuphead74832 commented on Sep 17, 2026

    @Cuphead74832

    Yeah opencode is down, same issue here.

  4. troikoss commented on Sep 17, 2026

    @troikoss

    same issue, even the manual /compact command doesnt work

  5. novasec81-creator commented on Sep 17, 2026

    @novasec81-creator

    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.

  6. onelpawarai-X commented on Sep 17, 2026

    @onelpawarai-X

    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.

  7. soulinker commented on Sep 17, 2026

    @soulinker

    happens only during compaction

  8. karokarok commented on Sep 17, 2026

    @karokarok

    wtf is going on in opencode they seem to ignore this issue.

  9. HafizAhmadJamil commented on Sep 17, 2026

    @HafizAhmadJamil

    Same issue on ubuntu

  10. zenviko commented on Sep 17, 2026

    @zenviko

    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!)

  11. rekram1-node commented on Sep 18, 2026

    @rekram1-node
    Contributor

    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?

  12. paulpas commented on Oct 12, 2026

    @paulpas

    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!)
    

    Sadly this did not work for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions