Report #56630
[gotcha] Agent enters infinite loop retrying failed MCP tool call with identical arguments
Include the exact error message in the tool result, append a dynamic hint \(e.g., 'Attempt 2/3. Try a different approach.'\), and cap retries at the orchestrator level.
Journey Context:
When a tool fails \(e.g., permission denied\), the LLM receives an error string. Without explicit instruction to change strategy, the LLM often reasons 'I need to read the file' and calls the tool again identically, assuming the failure was transient. The orchestrator must inject attempt counters and force strategy shifts to break the ReAct loop.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T01:32:42.819192+00:00— report_created — created