You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
subagent: free-tier restriction triggers incorrectly when spawning from within OpenCode #55569
Subagent spawn fails with "OpenCode's free tier can only be used from within OpenCode" error even when already running inside OpenCode v2.0.28. An agent configured to use the opencode provider with free-tier model muse-spark-1.3-contributor-free cannot be spawned.
Environment
opencode version: 2.0.28
OS: Linux 7.2.9-arch1-1 (linux x64)
Terminal: TERM=xterm-kitty, COLORTERM=truecolor
Shell: /usr/bin/zsh
Install/channel: latest
Active plugins: envsitter-guard, opencode-mem, custom plugin (local path)
Reproduction
Configure an agent (e.g., fixer) in OpenCode config to use the opencode provider with a free-tier model (e.g., muse-spark-1.3-contributor-free)
Start OpenCode (TUI or CLI)
Attempt to spawn the configured agent via the agent spawn UI or programmatically
Observe the error: "OpenCode's free tier can only be used from within OpenCode. Download it at https://opencode.ai and keep building."
Expected Behavior
The subagent should spawn successfully since we are already running inside OpenCode. The free-tier restriction should only apply when trying to use OpenCode models from outside the OpenCode environment.
Actual Behavior
Subagent spawn fails immediately with the free-tier restriction error, even though the parent session is running inside OpenCode v2.0.28.
Additional Context
The issue affects any agent configured with the opencode provider and a free-tier model
Reproduced consistently (100% failure rate on spawn attempts)
Agent config maps the fixer agent to: "provider": "opencode", "model": "muse-spark-1.3-contributor-free"
Other agents using the nvidia provider work correctly
This appears to be a false positive in the free-tier enforcement logic - it's not detecting that the request originates from within an OpenCode session
Thanks for the report! I think this is a duplicate of #50806: a custom subagent on a free OpenCode Zen model fails to spawn with this exact error, while the parent session works.
The cause is tracked in #50627. People there found that the free-tier check on the Console side rejects requests whose tool list leaves out some of the standard tools. This usually happens because the agent's permissions fully deny shell/bash (e.g. bash: deny or a shell*deny rule). Denying other tools such as read, or allowing only a small set of tools, can trigger it too. Built-in agents with the full toolset are not affected, which matches what you're seeing with fixer.
Workaround until it's fixed: check your fixer agent's permissions. If it denies bash/shell (or removes other tools), change deny to ask and try again.
Possible duplicates and closely related issues, ordered from most to least likely:
The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different, for example if your fixer agent doesn't deny or remove any tools. If the workaround helps, or if you have new findings, please add them to #50627.
Closing this as a duplicate of #50806, since we haven't heard back that your case is different. The root cause is tracked in #50627: the free-tier check rejects requests whose tool list leaves out standard tools, usually because a custom agent denies bash/shell.
Until it's fixed, check your fixer agent's permissions and change any bash/shelldeny to ask. Please follow #50627 for updates and add any new findings there. If your fixer agent doesn't deny or remove any tools, reply here and we can take another look. Thanks for reporting!
Activity
opencode-agent commentedon Oct 15, 2026
Thanks for the report! I think this is a duplicate of #50806: a custom subagent on a free OpenCode Zen model fails to spawn with this exact error, while the parent session works.
The cause is tracked in #50627. People there found that the free-tier check on the Console side rejects requests whose tool list leaves out some of the standard tools. This usually happens because the agent's permissions fully deny shell/
bash(e.g.bash: denyor ashell*denyrule). Denying other tools such asread, or allowing only a small set of tools, can trigger it too. Built-in agents with the full toolset are not affected, which matches what you're seeing withfixer.Workaround until it's fixed: check your
fixeragent's permissions. If it deniesbash/shell(or removes other tools), changedenytoaskand try again.Possible duplicates and closely related issues, ordered from most to least likely:
opencode/xxxxx-modelfails when used by a custom subagent #51612: custom subagent using anopencode/*free model fails with this errorexploresubagent hits the same error whilegeneralworksbuildworks (v2.0.28)The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different, for example if your
fixeragent doesn't deny or remove any tools. If the workaround helps, or if you have new findings, please add them to #50627.opencode-agent commentedon Oct 16, 2026
Closing this as a duplicate of #50806, since we haven't heard back that your case is different. The root cause is tracked in #50627: the free-tier check rejects requests whose tool list leaves out standard tools, usually because a custom agent denies
bash/shell.Until it's fixed, check your
fixeragent's permissions and change anybash/shelldenytoask. Please follow #50627 for updates and add any new findings there. If yourfixeragent doesn't deny or remove any tools, reply here and we can take another look. Thanks for reporting!