Delete the turn-budget mechanism and deprecate task() (CL-7004) - #625
Merged
TheGreatAxios merged 1 commit intoAug 24, 2026
Merged
Conversation
No max turns anywhere. Peer coding agents have no turn cap: they end a run on the model's own finish signal, an operator interrupt, or a hard error. Ours ended runs on a turn count that truncated real work -- a measured healthy lane used 59 assistant turns with a clean report, which explore (35), critique (45) and every 40 would have killed. Removed: nudge.maxTurns from all 17 director packages, the whole resolution chain (resolveSubAgentMaxTurns, resolveDefaultSubAgentMaxTurns, clampSubAgentMaxTurns, validateTaskMaxTurns, settings.subagentMaxTurns), subAgentTurnLimitExceeded and the turn-budget stop reason, the TURN_BUDGET re-dispatch ledger branch, thrashForceReport/report-forced, AgentProfile.maxTurns and its schema, the maxTurns arg on task() and spawn_agent, the intervention-log state.maxTurns field, and the eval harness's global soft turn-budget rubric (evaluateSoftBudget/overBudget) which failed cases for exceeding a turn count. task() is marked deprecated in favour of spawn_agent/wait_agents. --agent-timeout-ms is retained as the per-eval bound. Prompt text that taught the model to operate the budget is replaced with guidance on sharpening a brief instead.
TheGreatAxios
enabled auto-merge (squash)
August 24, 2026 14:29
TheGreatAxios
added a commit
that referenced
this pull request
Aug 27, 2026
No max turns anywhere. Peer coding agents have no turn cap: they end a run on the model's own finish signal, an operator interrupt, or a hard error. Ours ended runs on a turn count that truncated real work -- a measured healthy lane used 59 assistant turns with a clean report, which explore (35), critique (45) and every 40 would have killed. Removed: nudge.maxTurns from all 17 director packages, the whole resolution chain (resolveSubAgentMaxTurns, resolveDefaultSubAgentMaxTurns, clampSubAgentMaxTurns, validateTaskMaxTurns, settings.subagentMaxTurns), subAgentTurnLimitExceeded and the turn-budget stop reason, the TURN_BUDGET re-dispatch ledger branch, thrashForceReport/report-forced, AgentProfile.maxTurns and its schema, the maxTurns arg on task() and spawn_agent, the intervention-log state.maxTurns field, and the eval harness's global soft turn-budget rubric (evaluateSoftBudget/overBudget) which failed cases for exceeding a turn count. task() is marked deprecated in favour of spawn_agent/wait_agents. --agent-timeout-ms is retained as the per-eval bound. Prompt text that taught the model to operate the budget is replaced with guidance on sharpening a brief instead.
TheGreatAxios
added a commit
that referenced
this pull request
Aug 27, 2026
No max turns anywhere. Peer coding agents have no turn cap: they end a run on the model's own finish signal, an operator interrupt, or a hard error. Ours ended runs on a turn count that truncated real work -- a measured healthy lane used 59 assistant turns with a clean report, which explore (35), critique (45) and every 40 would have killed. Removed: nudge.maxTurns from all 17 director packages, the whole resolution chain (resolveSubAgentMaxTurns, resolveDefaultSubAgentMaxTurns, clampSubAgentMaxTurns, validateTaskMaxTurns, settings.subagentMaxTurns), subAgentTurnLimitExceeded and the turn-budget stop reason, the TURN_BUDGET re-dispatch ledger branch, thrashForceReport/report-forced, AgentProfile.maxTurns and its schema, the maxTurns arg on task() and spawn_agent, the intervention-log state.maxTurns field, and the eval harness's global soft turn-budget rubric (evaluateSoftBudget/overBudget) which failed cases for exceeding a turn count. task() is marked deprecated in favour of spawn_agent/wait_agents. --agent-timeout-ms is retained as the per-eval bound. Prompt text that taught the model to operate the budget is replaced with guidance on sharpening a brief instead.
TheGreatAxios
deleted the
cl-7004-delete-the-turn-budget-mechanism-entirely-and-mark-task
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.
No max turns anywhere. Net 147 insertions / 1436 deletions (−1289) across 71 files.
Peer coding agents have no turn cap — one resolves max-steps to
Infinityunless an operator opts in, the other has no turn-count constant in its loop. Both end a run on the model's own finish signal, an operator interrupt, or a hard error. Ours ended runs on a turn count that truncated real work: a measured healthy lane used 59 assistant turns, 58 carrying tool calls, with a clean final report — whichexplore(35),critique(45) and every 40 would have killed;intern(20) three times over.Removed
nudge.maxTurnsfrom all 17resolveSubAgentMaxTurns,resolveDefaultSubAgentMaxTurns,clampSubAgentMaxTurns,validateTaskMaxTurns,Settings.subagentMaxTurnsand its schema/load/save plumbingsubAgentTurnLimitExceeded, theturn-budgetstop reason and report text,TURN_BUDGET_STOP_AFTER_DISPATCHES,shouldStopTurnBudgetRedispatch, the turn-budget branch ofappendSubAgentParentHintsthrashForceReport,evaluateThrashStop,report-forced,REPORT_FORCED_WRAP_UP_NUDGEmaxTurnsontask()andspawn_agent, plus theprofileMaxTurnsthreading added in Thread the director package turn budget through spawn_agent (CL-7001) #622AgentProfile.maxTurnsand its arktype schema entryInterventionRecord.state.maxTurnsand the forensics "early stop" column that read itevaluateSoftBudget,overBudget,budgetError,OVER_BUDGET,--max-turns, andmaxTurnsfrom all four tier casesWhy the eval rubric went too
It never stopped an agent — it failed a case after the fact for exceeding 15/25/30/40 turns. Since the healthy reference run took 59, the instrument we planned to measure this release with would have scored a correct, complete run as a failure at every tier.
--agent-timeout-msis retained as the per-eval bound, andturnsUsedis still captured and reported — just no longer part of pass/fail. Verdict is nowagentExitCode === 0 && verify.exitCode === 0 && requireBehaviorCheck.ok, which still fails closed on a broken run.On
report-forcedDeleted rather than kept as a plain turn-count nudge. Without
maxTurnsthere is no denominator for "near budget", so a nudge keyed to an arbitrary turn number would be a new limit wearing guidance clothing.task()deprecationMarked deprecated in both the model-visible tool description and code, pointing at
spawn_agent/wait_agents. Not removed — much still routes through it. This is what CL-6942 specified: available during migration, then removed.Prompt text
The bullet teaching the model to pass
maxTurnsand re-dispatch with a higher one is replaced with guidance on the real judgement: if a worker comes back without finishing, change the brief rather than repeating it — narrow the scope, name the files, or state the done-when more sharply. Prompts guide output quality; code does enforcement.Also swept
Stale comments in
intervention-log.ts,session-store.ts,fleet-report.ts,report.tsandtool-execution-watchdog.tsasserting deleted mechanisms.explore's prompt claim that "the default budget is real" is gone. 15 package tests asserting specific budget numbers deleted rather than weakened.Gate
bun run checkgreen: 5278 pass, 0 fail — including the vendor reactor snapshot test that fails onmain.Follow-up filed: CL-7006 —
stopReasonFromReportstill parses stop reasons out of report prose, a second source of truth #610 was meant to end.