Skip to content

docs(delegate): document max_concurrent_children and max_spawn_depth … - #14568

Closed
MorAlekss wants to merge 1 commit into
NousResearch:mainfrom
MorAlekss:docs/delegate-task-config
Closed

docs(delegate): document max_concurrent_children and max_spawn_depth …#14568
MorAlekss wants to merge 1 commit into
NousResearch:mainfrom
MorAlekss:docs/delegate-task-config

Conversation

@MorAlekss

Copy link
Copy Markdown
Contributor

Summary

Documents two existing but undocumented delegate_task configuration parameters: max_concurrent_children and max_spawn_depth. Both are already implemented in code but easy to miss without reading the source.

What changed

  • cli-config.yaml.example: uncommented and expanded descriptions for max_concurrent_children and max_spawn_depth
  • tools/delegate_tool.py:
    • _get_max_concurrent_children(): added warning log when value > 10
    • tool description string: added paragraph linking to delegation.* config keys and nested delegation requirements
  • website/docs/guides/delegation-patterns.md: added "Tuning Concurrency and Depth" table to the Constraints section

Why

Skills like #379 (simplify, 3 parallel reviewers) and custom batch workflows need users to know that (a) the concurrency limit is configurable and (b) nested delegation requires both role="orchestrator" and max_spawn_depth >= 2. Currently neither is discoverable without reading delegate_tool.py source.

Example configuration

delegation:
  max_concurrent_children: 10   # default 3; floor 1, no hard ceiling
  max_spawn_depth: 2            # default 1; clamped [1, 3]

Raising max_spawn_depth to 2+ enables role="orchestrator" children to spawn their own workers.

Testing

No functional code changes - docs and logging only. Verified that cli-config.yaml.example parses as valid YAML.

@alt-glitch alt-glitch added type/docs Documentation improvements P3 Low — cosmetic, nice to have tool/delegate Subagent delegation labels Apr 23, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Likely duplicate of #13745 (merged) — same delegation config keys (max_concurrent_children, max_spawn_depth) already documented there. Please verify this PR adds content beyond what #13745 covered.

@MorAlekss

Copy link
Copy Markdown
Contributor Author

@alt-glitch Not a duplicate. #13745 covered configuration.md, environment-variables.md, and features/delegation.md. This PR covers different files: cli-config.yaml.example (uncommented and expanded the config knobs), tools/delegate_tool.py (cost warning log + schema description update), and guides/delegation-patterns.md (concurrency/depth table). Complementary, not overlapping.

@teknium1

Copy link
Copy Markdown
Contributor

Merged via #15454 (rebase-merge) with your authorship preserved on the doc commit. The only tweak: kept the two knobs commented in cli-config.yaml.example so users aren't pinned to the literal default when we raise it later. Improved comments, warning, docs table, and tool-description update all landed as-is. Thanks for the thorough documentation pass — these two knobs were genuinely underdocumented.

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

Labels

P3 Low — cosmetic, nice to have tool/delegate Subagent delegation type/docs Documentation improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants