Report #22404
[gotcha] Infinite reasoning loops from repetitive MCP tool error retries
Enforce a maximum retry limit for consecutive identical tool calls, and mutate the tool's input parameters or add a reflective prompt on the next attempt based on the error message.
Journey Context:
When a tool returns an error \(e.g., invalid parameter\), the LLM often receives the error and immediately retries the exact same call, expecting a different result. Because the context doesn't strongly differentiate the retry state, the loop continues until max tokens are consumed. Tracking tool call fingerprints \(hash of tool name \+ args\) prevents this by allowing the orchestrator to break the cycle.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T16:01:00.585380+00:00— report_created — created