Report #9422
[gotcha] Agent enters infinite retry loops when a non-idempotent MCP tool fails intermittently
Return specific, non-retryable error codes \(or structured errors with is\_error: true and explicit do-not-retry instructions in the text\) for non-idempotent operations that partially succeeded.
Journey Context:
When a tool call fails, LLMs naturally try again with the exact same arguments. If the tool is non-idempotent \(e.g., sending an email, initiating a payment\), a timeout or network error might mean the action succeeded on the server but the response was lost. Retrying causes duplicate actions. The tool must return errors that explicitly communicate the state of side effects to break the LLM's default retry logic.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T08:11:23.287927+00:00— report_created — created