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

Open
#49,723 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

2.0
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_PROGRAM and COLORTERM unset
  • Shell: C:\Windows\system32\cmd.exe (ComSpec)
  • Install/channel: latest via npm @opencode-ai/cli (wrapper opencode.ps1 → binary opencode2.exe, 148 MB); Node v22.18.0, npm 11.19.1
  • Active plugins: none found in config (checked opencode.json, ~/.config/opencode/opencode.json — only cli.json + service.json exist under ~/.config/opencode/, no agent overrides)

Reproduction

  1. Started a session inside the OpenCode CLI (main agent = opencode/big-pickle, runs fine).
  2. Invoked the subagent tool with agent = "explore" and a minimal prompt:
    { "agent": "explore", "prompt": "quick test" }
    
  3. Observed the failure — including when a model was pinned:
    { "agent": "explore", "model": "opencode/muse-spark-1.3-contributor-free", "prompt": "quick test" }
    
  4. 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-pickle
  • opencode/muse-spark-1.3-contributor-free
  • opencode/muse-spark-1.2-contributor-free
  • opencode/ling-3.0-flash-fin-free
  • opencode/mimo-v2.5-free
  • opencode/nemotron-3-ultra-free
  • opencode/nemotron-3.5-lightning-free
Models tried with general (all SUCCEED)

All OpenCode Zen models:

  • opencode/ling-3.0-flash-fin-free
  • opencode/muse-spark-1.3-contributor-free
  • opencode/mimo-v2.5-free

Note: google/gemini-3.5-flash-lite was 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 explore invocations failed; 3/3 general invocations succeeded. Consistent.
  • Recent changes: unknown; no config/plugin changes made before testing.
  • Workarounds: use general agent (with any OpenCode Zen model) instead of explore.
    This is a clean substitute for the exploration workload in this session.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.