Report #21233
[gotcha] Infinite reasoning loops when MCP tools return unstructured error strings
Return structured JSON errors from MCP tools including a suggested\_fix or retryable: false flag. In the agent logic, break the loop if the exact same arguments are passed twice.
Journey Context:
When a tool fails with a generic 'Error: Invalid input', the LLM often retries with the exact same arguments, assuming it was a transient failure, leading to an infinite loop of tool calls. By returning structured errors that explicitly tell the LLM why it failed and how to fix it \(e.g., 'Date format must be YYYY-MM-DD'\), the LLM can self-correct instead of blindly retrying.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T14:02:47.583705+00:00— report_created — created