fix(agents): raise maxTurns ceilings that silently truncate swarm deliverables - #169
Open
midineutron wants to merge 1 commit into
Open
fix(agents): raise maxTurns ceilings that silently truncate swarm deliverables#169midineutron wants to merge 1 commit into
midineutron wants to merge 1 commit into
Conversation
Three agents exhausted maxTurns mid-report during a real 6-phase swarm, returning truncated final messages. Measured tool-call counts from that run: scout maxTurns 15, used 27 reviewer maxTurns 25, used 39 validator maxTurns 40, used 64 The validator and reviewer recovered after a manual follow-up SendMessage — the work was done, only the report was cut off. The scout did not: its report never reached the orchestrator, so the single Phase 6 deliverable was lost and the orchestrator had to substitute its own observations. Raise the ceilings above observed usage: scout 15 -> 40 reviewer 25 -> 50 validator 40 -> 80 These are ceilings, not budgets. Raising them costs nothing when unused, while hitting one silently destroys a deliverable that gates the teardown check. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xkhq5SW3R3Ufy2CVakq1uu
This was referenced Jul 30, 2026
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
Three agents'
maxTurnsceilings are set below what a real 6-phase swarm consumes, so they exhaust their budget mid-report and return truncated final messages.Found while running
/pds:swarmend-to-end on a production repo (a ~1500-line OpenAPI spec resync, 11 acceptance criteria, 2 workers). Measured tool-call counts from that run:maxTurnsscoutreviewerSendMessagevalidatorSendMessageWhy it matters
The failure is quiet and it lands on the deliverable, not the work.
The validator and reviewer had both finished their actual work — merging, testing, reviewing — and were cut off while writing it up. A follow-up message retrieved it. The scout was worse: its report never arrived at all, so the orchestrator recorded it as a failed agent and substituted its own observations.
scout-report.mdis one of the three artifacts the teardown gate checks for, so losing it degrades the gate to a no-op.Note also that
scoutruns on haiku, which tends to use more tool calls to reach the same result, against the tightest ceiling in the roster.Change
Sized above observed usage with headroom, and kept proportionate to existing roster values (
orchestrator: 100,shepherd: 80,worker: 50).These are ceilings, not budgets — raising them costs nothing on runs that don't need the turns, while hitting one silently destroys a report.
Scope
Frontmatter only, three one-line changes. No behavioral or prompt changes.
Not included
Other issues from the same run are filed separately rather than bundled here, since they need root-cause discussion rather than a mechanical fix:
worker.mdhardcodesisolation: worktree, which fails with "WorktreeCreate hook failed: hook succeeded but returned no worktree path" — this makespds:workerunspawnable.Agent(name=...)is rejected for teammate-spawned orchestrators, which breaks the named-worker dispatch pattern documented inskills/swarm/SKILL.mdPhase 3.