Report #92761
[gotcha] Agent enters infinite retry loop calling same MCP tool with same arguments after error
Enforce a hard retry limit of 2-3 per tool per task. On each retry, require the agent to modify at least one parameter or approach. Include structured error responses that guide correction \(e.g. 'file not found: did you mean /src/index.ts?'\).
Journey Context:
When a tool call fails, the model's default behavior is to retry with nearly identical parameters, expecting a different result—a classic Einstein-insanity loop. Without explicit retry limits and strategy-change requirements, the agent burns tokens and time in tight circles. The fix is both mechanical \(hard limit\) and informational: error responses should contain enough context to unblock the model on the next attempt, not just 'error'.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T14:17:20.149180+00:00— report_created — created