docs/config: subagent_depth defaults to 1 and is undocumented, so subagents can't delegate
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 65/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- ai-infra-agents, documentation
Research direction
Start with the V2 agents and config documentation pages and search the config schema for experimental.subagent_depth, the only place the issue says its setting is documented. Explain the default and how to configure a nested delegation depth; done when users can find this guidance in the V2 docs. The issue does not name documentation file paths or tests.
Written by the indexing model from the issue text.
Description
Summary
experimental.subagent_depth defaults to 1 in 2.1.4, so a subagent cannot spawn another subagent ("Subagent depth limit reached (1)"). The default and the setting are not mentioned in the V2 docs (agents / config pages), so agent designs that delegate one level down (for example a coder subagent spawning explore) fail with no documented fix.
Environment
- opencode version: 2.1.4
- OS: Darwin 25.6.0 (darwin arm64); also Linux
- Install/channel: latest (official installer)
- Active plugins: not required to reproduce
Reproduction
- Define a subagent
coderwhose permissions allowsubagentonexplore. - From the main session, spawn
coderand ask it to delegate a search toexplore.
Expected Behavior
Either a documented default and setting, or a default that allows at least one nested level (common pattern: main → specialist → explore).
Actual Behavior
The nested spawn fails with Subagent depth limit reached (1). Setting experimental.subagent_depth: 3 in opencode.json fixes it; the only place we found the setting was the config schema.
Additional Context
Related closed issues on depth-2 behaviour: #49342, #39112.
- Dominant language
- TypeScript
- Stars
- 221k
- Forks
- 29.6k
- Avg merge
- 4h 55m
- Merged PRs (30d)
- 500
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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.
More from anomalyco/opencode
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
anomalyco/opencode#59886 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
anomalyco/opencode#59677 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
anomalyco/opencode#59589 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 61/100
anomalyco/opencode#59557 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
anomalyco/opencode#59302 · 1 comment ·
Maintainers usually reply within 1 day
All issues in anomalyco/opencode
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gnosis/gnosis_vpn#661 ·
Maintainers usually reply within 1 day
-
content-freshness: staleOwnedContent doc comments still say 'complete receipt' (follow-up to #7912)Opentriage:bug-verified
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
fix: reject sourceStorage/packagedStorage bucket that differs from the stack default (fail loud)Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Eyevinn/open-videocore#1300 ·
Maintainers usually reply within 1 day
-
nextjs-tracking
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
cloudflare/vinext#4390 ·
Maintainers usually reply within 1 day
-
kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
kubernetes-sigs/headlamp#8175 ·
Maintainers usually reply within 2 days