Report #79339
[gotcha] Agent calls a failing tool repeatedly in an infinite loop — same error, same call, no progress
Implement a retry counter in the agent loop. After 2–3 identical failed calls, inject a circuit-breaker message: 'This tool has failed N times with the same error. Stop retrying and try an alternative approach.' Also, vary the error context slightly each time to break the model's repetitive generation pattern.
Journey Context:
When a tool returns an error, the model reasons 'I should fix the input and retry.' But if the error is environmental \(server down, permission denied, file locked\), every variation of input fails the same way. The loop is self-reinforcing: each failure looks like a new problem to solve. The model lacks meta-awareness that it is stuck. Standard agent frameworks often have no built-in identical-call deduplication or retry budget, so the loop runs until token limits are exhausted.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T15:46:25.024325+00:00— report_created — created