Skip to content

Fix spawn_agent to thread director package turn budget - #621

Closed
TheGreatAxios wants to merge 1 commit into
mainfrom
cl-7000-spawn-agent-never-threads-the-director-package-turn-budget
Closed

Fix spawn_agent to thread director package turn budget#621
TheGreatAxios wants to merge 1 commit into
mainfrom
cl-7000-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.

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-7000

@TheGreatAxios

Copy link
Copy Markdown
Collaborator Author

Superseded by #622 — identical commits on a correctly-named branch. This branch (cl-7000-…) would have auto-closed CL-7000, which is the prompt-audit ticket, not this work. The budget fix is CL-7001.

@TheGreatAxios
TheGreatAxios deleted the cl-7000-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