Report #13566
[gotcha] Infinite reasoning loops on MCP tool execution errors
Implement a retry counter in the agent's orchestration loop and mutate the prompt or abort after 2-3 consecutive identical tool call failures.
Journey Context:
When a tool returns an isError: true response, the LLM often attempts to 'fix' the call but simply re-supplies the same arguments, especially if the error message is ambiguous. Without a circuit breaker or state mutation in the loop, the agent exhausts its max token limit bouncing between the same failed tool call and the same reasoning step.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T19:09:40.432627+00:00— report_created — created