Thread the director package turn budget through spawn_agent (CL-7001) - #622
Merged
TheGreatAxios merged 1 commit intoAug 24, 2026
Conversation
spawn_agent resolved a director's turn budget as Infinity because resolveDirectorDispatch never surfaced the package's nudge.maxTurns and agent-fleet.ts never passed it to resolveSubAgentMaxTurns, unlike task(). Also removes the false "hard cap 4 workers" prompt claim (no such cap exists), corrects the task-watchdog exemption comment (no-progress/thrash detectors were removed), and deletes the unread profile.maxTurns config knob.
TheGreatAxios
enabled auto-merge (squash)
August 24, 2026 13:41
TheGreatAxios
added a commit
that referenced
this pull request
Aug 27, 2026
spawn_agent resolved a director's turn budget as Infinity because resolveDirectorDispatch never surfaced the package's nudge.maxTurns and agent-fleet.ts never passed it to resolveSubAgentMaxTurns, unlike task(). Also removes the false "hard cap 4 workers" prompt claim (no such cap exists), corrects the task-watchdog exemption comment (no-progress/thrash detectors were removed), and deletes the unread profile.maxTurns config knob.
TheGreatAxios
added a commit
that referenced
this pull request
Aug 27, 2026
spawn_agent resolved a director's turn budget as Infinity because resolveDirectorDispatch never surfaced the package's nudge.maxTurns and agent-fleet.ts never passed it to resolveSubAgentMaxTurns, unlike task(). Also removes the false "hard cap 4 workers" prompt claim (no such cap exists), corrects the task-watchdog exemption comment (no-progress/thrash detectors were removed), and deletes the unread profile.maxTurns config knob.
TheGreatAxios
deleted the
cl-7001-spawn_agent-never-threads-the-director-package-turn-budget
branch
August 28, 2026 00:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
spawn_agentresolved to an unbounded turn budget for a director dispatch becauseresolveDirectorDispatchnever returned the package'snudge.maxTurnsandagent-fleet.tsnever passed it toresolveSubAgentMaxTurns.spawn_agentnow resolves the same finite package budget astask().src/agent/prompts.tsandsrc/agent/directors/skywalker/package.ts— there is no concurrency cap in the fleet code.src/tui/tool-execution-watchdog.ts— it referencedno-progress/thrashdetectors that no longer exist; exemption behavior unchanged.maxTurnsfield from project/named profile config (src/config/profiles.ts,src/config/index.ts) since nothing read the resolved value. Deleted rather than wired, to avoid inventing new precedence rules for a knob operators can't currently rely on.No new detector, cap, or limit added.
Test plan
bun test src/subagent/spawn-budget.test.ts— forintern,explore,build,critique,greybeard:spawn_agentandtask()resolve the same finite budget; non-director dispatch stays unbounded (deliberate).bun run check— full gate: 0 lint errors, tsc clean, 5340 tests pass / 0 fail.Replaces #621, which was opened on a branch name that would have auto-closed the wrong Linear issue. Identical commits.