Skip to content

Thread the director package turn budget through spawn_agent (CL-7001) - #622

Merged
TheGreatAxios merged 1 commit into
mainfrom
cl-7001-spawn_agent-never-threads-the-director-package-turn-budget
Aug 24, 2026
Merged

Thread the director package turn budget through spawn_agent (CL-7001)#622
TheGreatAxios merged 1 commit into
mainfrom
cl-7001-spawn_agent-never-threads-the-director-package-turn-budget

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • spawn_agent resolved to an unbounded turn budget for a director dispatch because resolveDirectorDispatch never returned the package's nudge.maxTurns and agent-fleet.ts never passed it to resolveSubAgentMaxTurns. spawn_agent now resolves the same finite package budget as task().
  • Deleted the false "hard cap 4 workers" prompt text at src/agent/prompts.ts and src/agent/directors/skywalker/package.ts — there is no concurrency cap in the fleet code.
  • Fixed the task-watchdog exemption comment in src/tui/tool-execution-watchdog.ts — it referenced no-progress/thrash detectors that no longer exist; exemption behavior unchanged.
  • Removed the dead maxTurns field 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 — for intern, explore, build, critique, greybeard: spawn_agent and task() 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.

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.
@linear-code

linear-code Bot commented Aug 24, 2026

Copy link
Copy Markdown

CL-7001

@TheGreatAxios
TheGreatAxios enabled auto-merge (squash) August 24, 2026 13:41
@TheGreatAxios
TheGreatAxios merged commit e39680a into main Aug 24, 2026
10 checks passed
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
TheGreatAxios deleted the cl-7001-spawn_agent-never-threads-the-director-package-turn-budget branch August 28, 2026 00:09
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