Skip to content

fix(tools): expose maxTurns on the subagent tool params (v0.9.3) - #13

Merged
rz1989s merged 2 commits into
mainfrom
fix/subagent-maxturns-param
Jul 27, 2026
Merged

rz1989s merged 2 commits into
mainfrom
fix/subagent-maxturns-param

Conversation

@rz1989s

@rz1989s rz1989s commented Jul 27, 2026

Copy link
Copy Markdown
Member

The subagent tool was hard-capped at 20 turns (DEFAULT_MAX_TURNS) with no way for the caller to raise it. Complex multi-step tasks routinely hit the budget mid-task. Claude Code's Task tool has no such tight cap.

Expose maxTurns as an optional param (default 20 unchanged) so the model can raise it (e.g. 40) for complex tasks. Threaded through the foreground delegate + lifecycle spawn paths.

Why

Dogfooding fleet to build SPEC-6-1 — Tasks 5/6/10 all hit the 20-turn budget. The controller needs a way to raise the cap per-task.

Verification

313/313 tests pass, typecheck clean. Default unchanged (back-compat).

rz1989s added 2 commits July 27, 2026 13:42
The subagent tool was hard-capped at 20 turns (DEFAULT_MAX_TURNS) with no way
for the caller to raise it. Complex tasks (read a large file + plan + implement +
test + commit) routinely hit the budget mid-task — Tasks 5/6/10 in the SPEC-6-1
dogfood all hit it. Claude Code's Task tool has no such tight cap.

Expose maxTurns as an optional param (default 20 unchanged) so the model can
raise it (e.g. 40) for complex multi-step tasks. Threaded through both the
foreground delegate + lifecycle spawn paths.
@rz1989s
rz1989s merged commit 3146eab into main Jul 27, 2026
1 check passed
@rz1989s
rz1989s deleted the fix/subagent-maxturns-param branch July 27, 2026 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant