Report #11351
[gotcha] Infinite agent retry loops when MCP tool returns generic or unactionable error messages
Design tool error responses to be highly specific and include the exact state mutation \(if any\) or the precise reason for failure, preventing the LLM from retrying identical parameters.
Journey Context:
If a tool fails with a generic Error: Invalid input, the LLM will often try slightly varying the input, fail again, and loop. Worse, if the tool is stateful \(e.g., creates a resource\) but fails on a secondary step, retrying might create duplicates. Tool errors must be treated as first-class context. They must explicitly state what failed, why, and what the LLM should do differently \(e.g., File already exists, cannot overwrite. Use update\_file instead.\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T13:10:38.489018+00:00— report_created — created