Skip to content

Commit a27ffb2

Browse files
docs: document subagent depth (anomalyco#37132)
Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com>
1 parent 81141dc commit a27ffb2

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

packages/web/src/content/docs/config.mdx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,21 @@ This setting applies across all interfaces: TUI, CLI (`opencode run`), desktop a
538538

539539
---
540540

541+
### Subagent depth
542+
543+
You can control how deeply subagents can invoke other subagents using the `subagent_depth` option.
544+
545+
```json title="opencode.json"
546+
{
547+
"$schema": "https://opencode.ai/config.json",
548+
"subagent_depth": 2
549+
}
550+
```
551+
552+
The default is `1`, which allows primary agents to launch subagents but prevents those subagents from launching additional subagents. Set it to `2` to allow one additional level of nested subagents, or `0` to prevent all subagent launches.
553+
554+
---
555+
541556
### Sharing
542557

543558
You can configure the [share](/docs/share) feature through the `share` option.

0 commit comments

Comments
 (0)