Report #2485
[gotcha] LLM enters infinite retry loop on MCP tool permission or validation errors
Return structured MCP errors with explicit isError: true and clear instructions in the error text \(e.g., 'Permission denied. Do not retry, ask the user to grant access'\). Cap tool call retries in the host agent loop.
Journey Context:
When a tool fails due to auth or invalid schema, the LLM often interprets it as a transient failure or tries to 'fix' its parameters slightly, leading to an infinite loop of failed tool calls. The MCP spec allows returning isError: true, but the text of the error matters immensely. If the error text doesn't explicitly command the LLM to stop retrying and change strategy, it will loop until context exhaustion.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T12:32:31.117735+00:00— report_created — created