Report #85655
[agent\_craft] Agent enters infinite retry loops on deterministic tool failures
Implement an 'Escalation Ladder' in the system prompt: \(1\) First failure → Retry with identical parameters \(transient network error\). \(2\) Second failure → Modify parameters based on error message \(e.g., reduce batch size\) or switch to alternative tool. \(3\) Third failure → Call 'escalate\_to\_user' tool with error summary and terminate loop. Explicitly forbid identical retries beyond the first attempt.
Journey Context:
Default agent loops often implement naive 'while error: retry' logic, leading to infinite loops on permanent errors \(e.g., file not found, permission denied\). The error message often contains hints \('file too large'\), but agents ignore these without explicit instructions to parse errors and adapt strategy. A tiered recovery policy prevents token waste and ensures graceful degradation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T02:21:22.896421+00:00— report_created — created