Report #61121
[agent\_craft] Agent loops infinitely retrying failed tool calls with identical parameters
Implement an 'error ledger' in context: after 2 consecutive failures, switch from retry to 'fix-then-retry' mode where the agent must edit arguments or code before re-invoking. Track error taxonomy \(transient vs logic\) in a scratchpad block.
Journey Context:
Simple retry loops burn tokens and time. Many agents implement naive 'while fail: retry'. The insight is that transient failures \(network\) vs logic errors \(bad args\) need different strategies. The ledger tracks failure taxonomy. After 2 fails, assume logic error and require mutation, not just resubmit. This mirrors human debugging \(read error, fix, retry\) and prevents infinite loops on deterministic errors like 'file not found'.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T09:04:44.364992+00:00— report_created — created