subagent: custom agent spawn fails with "free tier can only be used from within OpenCode" · Issue #50806 · anomalyco/opencode · GitHub
Skip to content

subagent: custom agent spawn fails with "free tier can only be used from within OpenCode" #50806

Closed as duplicate

Description

@moziyan

Description

Summary

Spawning a subagent (a custom agent) from a session fails immediately with
Error from provider (Console): OpenCode's free tier can only be used from within OpenCode.
The child session never starts, so custom agents are unusable on the free tier.

Environment

  • opencode version: 2.0.14
  • OS: Linux 6.6.87.2-microsoft-standard-WSL2 (linux x64)
  • Terminal: TERM=xterm-256color (TERM_PROGRAM/COLORTERM unset)
  • Shell: /bin/bash
  • Install/channel: latest (release)
  • Active plugins: none found (no opencode.json, .opencode/plugin/, or .opencode/plugins/)

Reproduction

  1. Launch OpenCode and open a session with the default provider (free tier).
  2. Ask the agent to delegate a task to a subagent, e.g. call the subagent tool
    with agent: "architect" (a configured custom agent), a description and a prompt.
  3. The spawn returns an error instead of starting the child session.

Expected Behavior

The subagent session starts and the task runs, with the free-tier entitlement
applied the same way as the parent session.

Actual Behavior

The tool execution fails with:

{"error":{"type":"tool.execution","message":"Subagent failed (sessionID: ses_...):
Error from provider (Console): OpenCode's free tier can only be used from within OpenCode"}}

The provider is reported as Console. The parent session on the same provider works.

Additional Context

  • Reproducible: consistent (reproduced on the first attempt).
  • The failing call is a subagent spawn for a custom agent (agent: architect);
    unclear whether built-in agents are affected too.
  • Hypothesis: the child session's provider request does not carry the flag/context
    that marks it as "from within OpenCode", so the free-tier gate rejects it.
  • No recent config changes, plugins, or terminal changes prior to the error.
  • No workaround found yet.

Plugins

no plugins

OpenCode version

2.0.14

Steps to reproduce

  1. Launch OpenCode and open a session with the default provider (free tier).
  2. Ask the agent to delegate a task to a subagent, e.g. call the subagent tool
    with agent: "architect" (a configured custom agent), a description and a prompt.
  3. The spawn returns an error instead of starting the child session.

Screenshot and/or share link

No response

Operating System

Linux 6.6.87.2-microsoft-standard-WSL2 (linux x64)

Terminal

TERM=xterm-256color (TERM_PROGRAM/COLORTERM unset)

Activity

  1. github-actions commented on Sep 23, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    If your issue is distinct from those, please add context explaining what differs.

  2. neriousy commented on Oct 20, 2026

    @neriousy
    Member

    Thanks for the report. We're tracking this same free-tier rejection affecting subagents in #49723, so I'm closing this as a duplicate. Please follow that issue for updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions