Report #16342
[agent\_craft] Infinite loops when agent repeatedly retries the same failing tool call with identical parameters after transient errors
Implement an explicit error budget \(max 3 retries\) and mandate strategy switching on failure: require the agent to explicitly select a different tool or modify parameters significantly \(not just reformat\) before retrying, logging the failure mode to avoid repetition
Journey Context:
Naive retry loops \(while not success: retry\) fail because LLMs are stateful in context but don't inherently track 'I've tried this 5 times'. The model needs to be forced to reflect on \*why\* it failed before continuing. The error budget prevents runaway token consumption. The 'strategy switch' requirement breaks the loop by changing the tool call signature \(e.g., from \`grep -r\` to \`find . -name\`\). This is superior to simple backtracking because it forces exploration. Alternatives like 'exponential backoff' don't fix the logical error of using the wrong tool.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T02:24:26.481584+00:00— report_created — created