anomalyco / anomalyco/opencode
subagents: explore agent denied free tier can only be used from within OpenCode while running inside the CLI — general works with identical models
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the CLI subagent tool's request routing and free-tier entitlement check, comparing the explore and general paths. Reproduce the issue with the supplied model IDs, then verify that explore succeeds inside the CLI with the same OpenCode Zen models that work for general.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- backend-api-design, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100