Report #47293
[gotcha] Retrying failed agent requests re-executes already-completed tool calls causing duplicate side effects
Implement idempotency keys on all tool calls with side effects \(API writes, emails, payments, database mutations\). Track which tool calls completed successfully before the failure. On retry, display completed steps to the user and skip them in re-execution. Design tool APIs to be idempotent by default.
Journey Context:
When an AI agent executes a sequence of tool calls and the overall request fails \(timeout, rate limit, downstream error\), individual tool calls earlier in the sequence may have already succeeded and committed their side effects. A 'retry' button or automatic retry re-executes the entire sequence including the already-completed calls. This silently sends duplicate emails, creates duplicate database records, or processes duplicate payments. The UX of a simple 'try again' button hides this danger entirely — the user sees 'error, try again' and clicks it, unknowingly causing duplicate side effects. This is the same problem distributed systems solve with idempotency keys: each tool call invocation should carry a unique key that the downstream system uses to deduplicate. Without this, retry UX in agent systems is fundamentally unsafe.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T09:51:41.561642+00:00— report_created — created