GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [Bug] "OpenCode's free tier can only be used from within OpenCode" error when using Custom Agents · Issue #50081 · anomalyco/opencode

[Bug] "OpenCode's free tier can only be used from within OpenCode" error when using Custom Agents #50081

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
[Bug] "OpenCode's free tier can only be used from within OpenCode" error when using Custom Agents#50081
Copy link

Description

@zzjcnn
zzjcnn
opened on Sep 20, 2026
Issue body actions

Description

Describe the bug
I am encountering an error when attempting to use a custom agent configuration within OpenCode. The request fails, and the console outputs the following error message:

Error from provider (Console): OpenCode's free tier can only be used from within OpenCode

To Reproduce
Configure a custom agent (e.g., modifying the configuration to use a specific model or custom prompt).

Trigger the agent within the OpenCode environment.

Observe the error in the console output.

Expected behavior
The custom agent should execute normally using the available free tier, as it is being invoked from within the OpenCode application.

Actual behavior
The provider rejects the request, stating that the free tier can only be used "within OpenCode," despite the request originating from the OpenCode client.

Additional Context
It appears the provider's validation logic might be incorrectly identifying the custom agent request as an external or unauthorized source.

Attached is a screenshot of the specific error message.

Plugins

No response

OpenCode version

1.18.31

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. zzjcnn commented on Sep 20, 2026

    @zzjcnn
    zzjcnn
    on Sep 20, 2026
    Author
    More actions
    Image
  2. Neloy-Barman commented on Sep 20, 2026

    @Neloy-Barman
    Neloy-Barman
    on Sep 20, 2026
    More actions

    I ran into this same issue yesterday while trying to run a custom agent. After digging around, it looks like this is a known side effect of OpenCode's V1 → V2 migration — agent configs defined the old way won't work under V2 without updating the permission format.

    For reference, here's a simple code reviewer agent definition:

    V1 (old) permission format:

    ---
    description: Primary review agent that validates implementation quality and creates comprehensive test scenarios
    mode: primary
    model: opencode/mimo-v2.5-free
    temperature: 0.1
    permission:
      read: allow
      edit: deny
      bash: deny
    ---
    
    You are the Primary Review Agent responsible for validating implementation quality and creating comprehensive test scenarios.

    V2 (new) permission format:

    ---
    description: Primary review agent that validates implementation quality and creates comprehensive test scenarios
    mode: primary
    model: opencode/mimo-v2.5-free
    permissions:
      - action: read
        resource: "*"
        effect: allow
      - action: edit
        resource: "*"
        effect: deny
      - action: bash
        resource: "*"
        effect: deny
    ---
    
    You are the Primary Review Agent responsible for validating implementation quality and creating comprehensive test scenarios.

    Switching to the V2 permission block (array of {action, resource, effect} objects instead of the flat permission map) fixed it for me. This isn't a bug on OpenCode's end — it's purely a migration issue on the agent config side.

    Docs: https://opencode.ai/v2/docs/migrate-v1/#permissions-and-tools

    Reacted by Drasenix
    Reacted by Sekedus
  3. qstmenu commented on Sep 20, 2026

    @qstmenu
    qstmenu
    on Sep 20, 2026
    More actions

    Got the same issue when running the "opencode agent create" command to make custom agent.

    Image
  4. Neloy-Barman commented on Sep 20, 2026

    @Neloy-Barman
    Neloy-Barman
    on Sep 20, 2026
    More actions

    @qstmenu, try creating the agent config manually instead of using CMD.

  5. Drasenix commented on Sep 21, 2026

    @Drasenix
    Drasenix
    on Sep 21, 2026
    More actions

    @Neloy-Barman Thank you ! It worked for me !

    Reacted by Neloy Barman
  6. Neloy-Barman commented on Sep 21, 2026

    @Neloy-Barman
    Neloy-Barman
    on Sep 21, 2026
    More actions

    @Drasenix Welcome.

  7. marco-rionaut commented on Sep 22, 2026

    @marco-rionaut
    marco-rionaut
    on Sep 22, 2026
    More actions

    Reproduces on 2.0.12 (macOS, Homebrew) — and the trigger narrows down to the agent's deny permissions, not the permission format. The V2 permissions array does not fix it here:

    agent permissions result
    f4noperm none bereit (works)
    f4deny V2 array: edit+shell → deny 403
    f4denyv1 V1 map: edit: deny, bash: deny 403

    Minimal repro:

    1. .opencode/agent/deny.md
      ---
      description: repro
      mode: primary
      permissions:
        - {"action": "edit", "resource": "*", "effect": "deny"}
        - {"action": "shell", "resource": "*", "effect": "deny"}
      ---
    2. printf 'Reply with one word: ok' | opencode run --standalone --model opencode/muse-spark-1.3-contributor-free --format json --agent deny
    3. → {"type":"error","error":{"type":"provider.auth","message":"Error from provider (Console): OpenCode's free tier can only be used from within OpenCode","status":403}}

    The same invocation with --agent build (or an agent without denies) answers normally; --standalone makes no difference.

    Environment: opencode v2.0.12 (Homebrew opencode-v2), macOS 27.0 arm64. Suspect: with tools stripped by deny, the request no longer passes the console-side origin check.

  8. sekedus commented on Sep 22, 2026

    @sekedus
    sekedus
    on Sep 22, 2026
    More actions

    see my workaround here.

  9. thdxr commented on Oct 11, 2026

    @thdxr
    thdxr
    on Oct 11, 2026
    Member
    More actions

    Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

  10. thdxr
    closed this as not plannedon Oct 11, 2026
  11. SC0d3r commented on Oct 17, 2026

    @SC0d3r
    SC0d3r
    on Oct 17, 2026
    More actions
    Image

    I am constantly getting this error in opencode version v2.0.32
    and i am not using any agent, its just a simple default build mode in opencode v2

    Reacted by hpn332
  12. sixfingerdev commented on Oct 18, 2026

    @sixfingerdev
    sixfingerdev
    on Oct 18, 2026
    More actions

    me too, in opencode 2

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

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.