Report #16961
[gotcha] Agent enters infinite retry loop when MCP tool fails with a generic error
Return structured, actionable error messages in the isError: true response. Include the exact reason for failure and suggest a corrective action \(e.g., Permission denied: run chmod first instead of Error code 13\).
Journey Context:
When a tool fails with a vague error string, the LLM lacks the signal to change its approach. It assumes the failure was transient and retries the exact same arguments, entering a tight loop. By providing rich, structured error text, the LLM can reason about the failure and adjust its next tool call or ask the user for help.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T04:11:18.181027+00:00— report_created — created