Repository navigation
Description
Author: OpenCode (bug report generated by the OpenCode CLI agent while reproducing the failure).
Summary
While running as a session inside the OpenCode CLI, I reproduced a consistent defect in the
built-in explore subagent: every invocation fails with
Error from provider (Console): OpenCode's free tier can only be used from within OpenCode
even though this session is running inside the OpenCode CLI itself, my main agent uses
OpenCode Zen free models fine, and the built-in general subagent succeeds with the identical
model IDs. The free-tier entitlement check only misclassifies the explore request path — a
routing defect in the built-in agent, not a policy the user tripped.
Environment
- opencode version: v2.0.7
- OS: Microsoft Windows 10.0.26100.9457 (build 26100), x64 (AMD64)
- Terminal: xterm-256color;
TERM_PROGRAMandCOLORTERMunset - Shell:
C:\Windows\system32\cmd.exe(ComSpec) - Install/channel: latest via npm
@opencode-ai/cli(wrapperopencode.ps1→ binaryopencode2.exe, 148 MB); Node v22.18.0, npm 11.19.1 - Active plugins: none found in config (checked
opencode.json,~/.config/opencode/opencode.json— onlycli.json+service.jsonexist under~/.config/opencode/, no agent overrides)
Reproduction
- Started a session inside the OpenCode CLI (main agent =
opencode/big-pickle, runs fine). - Invoked the
subagenttool withagent = "explore"and a minimal prompt:{ "agent": "explore", "prompt": "quick test" } - Observed the failure — including when a model was pinned:
{ "agent": "explore", "model": "opencode/muse-spark-1.3-contributor-free", "prompt": "quick test" } - Invoked the same subagent with
agent = "general"and the same model ID — it succeeded.
Models tried with explore (all FAIL with identical error)
All OpenCode Zen models:
- default (no model)
opencode/big-pickleopencode/muse-spark-1.3-contributor-freeopencode/muse-spark-1.2-contributor-freeopencode/ling-3.0-flash-fin-freeopencode/mimo-v2.5-freeopencode/nemotron-3-ultra-freeopencode/nemotron-3.5-lightning-free
Models tried with general (all SUCCEED)
All OpenCode Zen models:
opencode/ling-3.0-flash-fin-freeopencode/muse-spark-1.3-contributor-freeopencode/mimo-v2.5-free
Note:
google/gemini-3.5-flash-litewas tested separately and works — but it is a
Google API model, not an OpenCode Zen free model. It is not part of the OpenCode
free-tier pool, so it was excluded from this.
Expected Behavior
Within the OpenCode CLI, the free-tier entitlement gate should pass for every built-in agent
using the same models — including explore. At minimum, explore should behave identically to
general for identical model IDs.
Actual Behavior
Every explore invocation returns the same hard error before any work happens:
Subagent failed (sessionID: ses_...): Error from provider (Console): OpenCode's free tier can only be used from within OpenCode
The main session (OpenCode Zen, opencode/big-pickle) and general subagents with the same
models work normally. The gate's "within OpenCode" check is therefore passing for some request
paths and failing for the explore one — inside the very same CLI session.
Additional Context
- Frequency: 8/8
exploreinvocations failed; 3/3generalinvocations succeeded. Consistent. - Recent changes: unknown; no config/plugin changes made before testing.
- Workarounds: use
generalagent (with any OpenCode Zen model) instead ofexplore.
This is a clean substitute for the exploration workload in this session.
Activity
Dante-dan commentedon Sep 18, 2026
I reproduced this with the official v2.0.7 macOS binary and an isolated config, so it is not Windows-specific.
general+opencode/mimo-v2.5-freesucceeds.explore+ the same model fails with the reported 403.explore's system prompt with the normal OpenCode harness identity still fails.exploreagent but allowing only itsshellpermission makes the same model request succeed.This narrows the failure to the Console free-tier client classifier rejecting the built-in
exploreread-only tool set, rather than model selection or prompt identity. Both agents use the same client-header construction inpackages/core/src/session/model-request.ts. Addingshelltoexplorewould weaken its intentional read-only boundary, so the classifier should recognize the officialexploretool signature instead.Jean-Eudes commentedon Sep 18, 2026
Same class of bug, different built-in agent: plan.
Environment: opencode v2.0.8, Linux (official install), Zen free tier (provider Console), no plugins, no other config.
Reproduction (consistent, 100% of attempts, also with --standalone):
"agents": { "plan": { "permissions": [ { "action": "shell", "resource": "*", "effect": "deny" } ] } }
Test matrix — same binary, same server, same free-tier models (muse-spark-1.3-contributor-free, big-pickle):
Impact: the documented way to lock down the plan agent (agents.plan.permissions) makes that agent unusable on the free tier. Like the explore case, the gate accepts some request paths and rejects others, inside the same CLI.
Workaround for now: drop the agents.plan.permissions override (built-in plan already denies edits outside ~/.opencode/plan and asks before shell commands).
pamod-madubashana commentedon Sep 19, 2026
I'm hitting the same issue on v2.0.8 (official CLI).
Reproduction:
exploresubagent with the same models fails immediately with:generalsubagent with identical models succeeds without issues.Confirmed multiple
exploreinvocations failed;generalinvocations succeeded with the same model IDs.Workaround is using
generalin place ofexplore, which works but loses the read-only exploration intent.Looking forward to the fix. 👀
rs1052 commentedon Sep 19, 2026
Removing
"bash": "deny"from my agent config fixed it for me.pculler commentedon Sep 19, 2026
Free Zen models fail with a client-identity error, but only on subagent requests. The primary agent (paid opencode-go) works fine.
Error:
AI_APICallError: OpenCode's free tier can only be used from within OpenCode
Environment:
Evidence (from ~/.local/share/opencode/log/opencode.log):
Timeline:
Impact:
Background subagents cannot use any free Zen model at all, and each failed run surfaces the error to the user. Interactive free-tier use is also hit by "Free usage exceeded".
pamod-madubashana commentedon Sep 20, 2026
Just to clarify — removing
"bash": "deny"isn’t really fixing the sub-agent issue. What it’s actually doing is granting the main agent thebashpermission it was missing, which changes the request signature enough to pass the free-tier classifier.The underlying problem is still there: the free-tier entitlement gate rejects sub-agent requests based on their tool/permission set, regardless of whether the sub-agent actually needs
bash. Theexploreagent is intentionally read-only and should never have shell access, yet it fails with the same 403 — whilegeneralwith identical models succeeds.So the workaround "works" by sidestepping the classifier, but it doesn’t address the root cause: sub-agent requests should be classified the same as primary agent requests when using the same free-tier models from within the CLI.
wiwatsrt commentedon Sep 20, 2026
I'm hitting the same issue on 2.0.11 (official CLI) Fresh Install.
ShrekBytes commentedon Sep 22, 2026
have been facing the same issue.
Environment:
Arch Linux
Opencode2 v2.0.12
Model: mimo 2.6 flash free (using personal account/logged in)
skaldebane commentedon Sep 22, 2026
Still broken in v2.0.14, with
opencode/mimo-v2.6-flash-free.hymsoft commentedon Oct 3, 2026
Confirming the same trigger on my setup + minimal workaround.
Setup:
mode: subagent) that never needs bash (only reads.md/.typand returns text)Failing frontmatter (repro 3/3):
Error every time via task:
OpenCode's free tier can only be used from within OpenCode
Working frontmatter (repro 3/3 after restart):
The agent never calls bash. Declaring a noop echo allow is enough to route correctly. This matches #50627 (34 vs 35 tools) and #52880.
Happy to add logs if a maintainer tells me which ones.
nz12two commentedon Oct 11, 2026
Reproduced on 2.0.26 / Windows, measured 2026-10-11. Same model
opencode/space-bunny-free, same server run (run=7ce5f201in opencode.log) for the main session and for all three subagents — so the passing child and the failing children ran in the same process:generalexploreAI.Error: OpenCode's free tier can only be used from within OpenCodescoutTwo extra data points that may help narrow it down:
findstr); ripgrep finds nothing either. The log's stack points atB:/~BUN/root/chunk-nqcdhx9v.js:6:3619. So the string arrives from the server rather than from client-side tier policy.scoutfails identically toexplore. The original report coversexplorevsgeneral; the failure extends toscoutas well, which points at "free tier refused by agent route" rather than by tier.Reconnecting the account after the failure changed nothing —
explorewas retested post-login and returned the same error.opencode/xxxxx-modelfails when used by a custom subagent #51612 as a duplicate of this issuefix: cite the open opencode issue and add the shell permission key (#149
fix: cite the open opencode issue and add the shell permission key (#149
opencodejr commentedon Oct 28, 2026
Thanks for the detailed comparison between
exploreandgeneral. We couldn't reproduce this in our sandbox. The error comes from OpenCode Zen's free-tier check on the server, and our test environment is already over the free usage limit, so every free-model request was rejected before it reached that check.One difference we found in the code, though we haven't confirmed it causes this:
exploreis the only built-in subagent with its own system prompt, and that prompt replaces the default OpenCode one, whilegeneralkeeps the default. The request headers are the same for both. A maintainer with free-tier access will need to confirm whether that is what trips the check.Until then, using
generalfor exploration, as you did, is a reasonable workaround.docs: document the free-model limitation and release 0.3.0
cobrabr commentedon Nov 4, 2026
Linking my comment from #50627 because it's a different repro path but still relevant here.