Skip to content

OpenCode's free tier can only be used from within OpenCode while usign Opencode? #49610

Closed as duplicate

Description

@iy26adchak

Description

As described on the tittle opencode bugs out in compaction automatically saying:
"Error from provider (Console): OpenCode's free tier can only be used from within OpenCode"

Plugins

None

OpenCode version

Latest

Steps to reproduce

Just use /compaction or wait for the model itself to run it

Screenshot and/or share link

Image

Operating System

Windows 10 21H2

Terminal

None, using the app

Activity

  1. github-actions commented on Sep 17, 2026

    @github-actions
    Contributor

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

    If your issue is the same, please add a reaction or comment on one of the above rather than opening a new report.

  2. onelpawarai-X commented on Sep 17, 2026

    @onelpawarai-X

    I noticed another pattern. Starting a new session sometimes works for a short while, but after some usage (often when compaction happens) the same error comes back.

    This makes me wonder if some requests sent by OpenCode (especially compaction-related requests) are missing the expected validation headers or session information, causing the backend to treat them as if they weren't coming from the official OpenCode Desktop app.

  3. iy26adchak commented on Sep 17, 2026

    @iy26adchak
    Author

    It's not getting fixed and every report gets flagged with need:compliance, so yes, ill open a new report for the people who can't :)

  4. iy26adchak commented on Sep 17, 2026

    @iy26adchak
    Author

    I noticed another pattern. Starting a new session sometimes works for a short while, but after some usage (often when compaction happens) the same error comes back.

    This makes me wonder if some requests sent by OpenCode (especially compaction-related requests) are missing the expected validation headers or session information, causing the backend to treat them as if they weren't coming from the official OpenCode Desktop app.

    hmmm, might be that but still, people who had a task are now hard locked and cant do anything 🤷‍♂️

  5. SakonLight90 commented on Sep 17, 2026

    @SakonLight90

    I was able to get it to work just by using the cli command for auth.
    opencode auth login

  6. iy26adchak commented on Sep 17, 2026

    @iy26adchak
    Author

    I was able to get it to work just by using the cli command for auth. opencode auth login

    interesting... would you mind being more specific so i can try it too please

  7. SakonLight90 commented on Sep 17, 2026

    @SakonLight90

    Sure, here are the steps I took:
    Set Big Pickle.
    Encountered the error upon reaching the "compact" stage.
    Closed OpenCode Desktop.
    Opened the command prompt and ran the command opencode auth login.
    Selected the OpenCode Zen API.
    Logged in at https://opencode.ai/auth
    Retrieved my API key and pasted it in the command prompt.
    Closed the prompt and opened the desktop client.
    My agent is back to work.

  8. iy26adchak commented on Sep 17, 2026

    @iy26adchak
    Author

    Sure, here are the steps I took: Set Big Pickle. Encountered the error upon reaching the "compact" stage. Closed OpenCode Desktop. Opened the command prompt and ran the command opencode auth login. Selected the OpenCode Zen API. Logged in at https://opencode.ai/auth Retrieved my API key and pasted it in the command prompt. Closed the prompt and opened the desktop client. My agent is back to work.

    thank you very much, ill try it out

  9. Haimanot25 commented on Sep 17, 2026

    @Haimanot25

    Best workaround for you: disable automatic compaction
    Your global config currently is:
    {
    "$schema": "https://opencode.ai/config.json"
    }
    change it to

    {
    "$schema": "https://opencode.ai/config.json",
    "compaction": {
    "auto": false
    }
    }
    run :notepad "$env:USERPROFILE.config\opencode\opencode.jsonc"

  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. iy26adchak commented on Sep 17, 2026

    @iy26adchak
    Author

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

    well, i think they fixed it cause its now working again! thanks fo rall the recommendations

  12. thedrachengaming-cmd commented on Sep 17, 2026

    @thedrachengaming-cmd

    It's not getting fixed and every report gets flagged with need:compliance, so yes, ill open a new report for the people who can't :)

    if we implement compliance layers, there will never be any real issues!

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

  14. paulpas commented on Sep 21, 2026

    @paulpas

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

    well, i think they fixed it cause its now working again! thanks fo rall the recommendations

    This did not fix my issue. It remains.

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

Metadata

Metadata

Assignees

No one assigned

    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