Repository navigation
Closed as duplicate
Closed as duplicate
Copy link
Labels
Description
Description
Summary
Sending any prompt (even a trivial "hola") to a custom primary agent selected with Shift+Tab fails with a free-tier error, while the same prompt to the built-in build agent on the same free model works fine.
Environment
- opencode version: v2.0.28
- OS: Linux 6.18.54.1-microsoft-standard-WSL2 (linux x64)
- Terminal: TERM=xterm-256color (no TERM_PROGRAM/COLORTERM)
- Shell: /bin/bash
- Install/channel: latest (release)
- Active plugins: none (no global config, no project config, no local plugins)
Reproduction
- Create a project custom agent at
.opencode/agents/coordinator.mdwithmode: primary(definition below). - Open opencode in that project.
- Press Shift+Tab and select the
coordinatoragent. - Type
Holaand send. - Repeat steps 3-4 with the built-in
buildagent.
Expected Behavior
Both agents respond using the configured free model, since neither the agent definition nor the prompt changes the model or the channel.
Actual Behavior
buildanswers normally.coordinatorfails every time with:Error: OpenCode's free tier can only be used from within OpenCode. Download it at https://opencode.ai and keep building.
Additional Context
- Reproducible consistently, including with prompts that use no tools, reads, or subagents, so agent permissions are ruled out as the cause.
- The custom agent defines no
model:, so it inherits the same session free model asbuild. - Agent definition used (no secrets):
---
description: SDD - coordina el flujo SDD completo con planner, implementer y reviewer, y transmite el contexto entre fases
mode: primary
permissions:
- action: edit
resource: "*"
effect: deny
- action: shell
resource: "*"
effect: deny
- action: webfetch
resource: "*"
effect: deny
- action: websearch
resource: "*"
effect: deny
- action: subagent
resource: "*"
effect: deny
- action: subagent
resource: "planner"
effect: allow
- action: subagent
resource: "implementer"
effect: allow
- action: subagent
resource: "reviewer"
effect: allow
---
(agent system prompt omitted, unrelated to the error)- Hypothesis: opening a session with a custom primary agent loses the "from within OpenCode" client attestation that the free-tier gateway requires, while built-in agents keep it.
Plugins
None (no global config, no project config, no local plugins)
OpenCode version
v2.0.28
Steps to reproduce
- Create a project custom agent at
.opencode/agents/coordinator.mdwithmode: primary(definition below). - Open opencode in that project.
- Press Shift+Tab and select the
coordinatoragent. - Type
Holaand send. - Repeat steps 3-4 with the built-in
buildagent.
- Reproducible consistently, including with prompts that use no tools, reads, or subagents, so agent permissions are ruled out as the cause.
- The custom agent defines no
model:, so it inherits the same session free model asbuild. - Agent definition used (no secrets):
---
description: SDD - coordina el flujo SDD completo con planner, implementer y reviewer, y transmite el contexto entre fases
mode: primary
permissions:
- action: edit
resource: "*"
effect: deny
- action: shell
resource: "*"
effect: deny
- action: webfetch
resource: "*"
effect: deny
- action: websearch
resource: "*"
effect: deny
- action: subagent
resource: "*"
effect: deny
- action: subagent
resource: "planner"
effect: allow
- action: subagent
resource: "implementer"
effect: allow
- action: subagent
resource: "reviewer"
effect: allow
---
(agent system prompt omitted, unrelated to the error)Screenshot and/or share link
No response
Operating System
Linux 6.18.54.1-microsoft-standard-WSL2 (linux x64) (WSL under Windows 10 IoT Enterprise LTSC 21H2 19044.7725)
Terminal
Warp
Activity
opencode-agent commentedon Oct 14, 2026
Thanks for the clear A/B comparison. I think this is a duplicate of #50627.
Your
coordinatoragent has ashell/resource: "*"/effect: denyrule. In #50627, a full shell deny on a custom agent causes this exact error on free-tier models, even for prompts that use no tools. A full shell deny leavesbashout of the request's tool list, and the free-tier gateway then rejects the request. That's whybuildworks andcoordinatordoesn't.Until it's fixed, commenters there report that changing that rule's
effectfromdenytoaskavoids the error. Your agent would then ask before running shell commands instead of refusing them.Possible duplicates and closely related issues, ordered from most to least likely:
denyon a custom primary agent breaks the free tier with this error (v2); same trigger as yoursexploresubagent rejected with the same error whilegeneralworksThe bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different. For example, reply if it still fails after switching the shell rule to
ask. You're welcome to add your v2.0.28 confirmation to #50627.opencode-agent commentedon Oct 15, 2026
Closing as a duplicate of #50627. We left this open for a day in case your problem turned out to be different, and haven't heard back.
Your
coordinatoragent has ashell/resource: "*"/effect: denyrule. That is the trigger tracked in #50627: free-tier requests from that agent fail with "OpenCode's free tier can only be used from within OpenCode", whilebuildworks. Until it's fixed, changing that rule'seffecttoaskavoids the error.Please follow #50627 for updates, and feel free to add your v2.0.28 confirmation there. If it still fails after switching the shell rule to
ask, reply here with the details. Thanks for the clear report!