agents: maxTurns is the only runaway-loop guard the host offers, and Cadence sets it nowhere #72
Labels
No labels
already-shipped
bug
documentation
duplicate
enhancement
good first issue
help wanted
in progress
invalid
needs-decision
proposal
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: crenshawdev/cadence#72
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The gap
maxTurnsis a supported subagent frontmatter field. Cadence sets it on none of its seven agents.All seven set
toolsandeffortand nothing else:effortmaxTurnscad-assumptions-analyzerxhighcad-executorhighcad-plan-checkerlowcad-plan-checker-highhighcad-plannerhighcad-reviewerhighcad-verifierhighgrep -rn maxTurnsover the repo returns nothing outside a spike write-up.Why it is worth a look
It is the only runaway-loop guard the host offers. Cadence's dispatch surface is
(agent_name, prompt, model?), and of everything the frontmatter exposes,maxTurnsis the single field that bounds how long a dispatch can run. Today nothing does.This matters more after #63, not less. Raising roles to
xhighraises tool-call counts by design, since effort is a coverage dial and not only a thinking dial. A looping executor is already the failure that motivates the model argument in #63 ("a looping executor burns more than the model it saved"). There is currently no ceiling on that loop.What this is not
Not a truncation mitigation. That was the neighbouring question in #63 and it is settled separately: truncation is per-response, turns are not, and the two do not interact. This issue exists only because the field turned up while enumerating what the frontmatter actually controls.
What has to be determined before setting anything
The behaviour on hitting the cap is unverified. Nobody has tested it here. Before a value goes in any agent file:
maxTurnshit produce? A structured return carrying partial work, or an error the orchestrator sees as a failed dispatch? This decides everything else. Cadence's executor reports a task manifest; a cap that discards it is a different feature from one that truncates it.A cap that fires on legitimate work is worse than no cap. That is the reason this is a decision and not a one-line patch.
Files this would touch
agents/*.md(frontmatter), and whatever incadence-core/bin/route.mjsinterprets a dispatch outcome if a capped run needs distinguishing from a failed one.Related