Report #55533
[gotcha] Retrying failed AI agent actions silently duplicates side effects
Implement idempotency keys on all AI tool calls that mutate state; before re-executing a tool call on retry, check whether the side effect already occurred; surface completed actions to the user so they know what succeeded before the failure point; design tool interfaces to be idempotent by default
Journey Context:
AI agents that call external tools \(send email, create database record, make payment\) can fail mid-sequence. When the user or system retries, already-executed tool calls run again, creating duplicate emails, records, or charges. This is especially sneaky with AI because: \(1\) the AI feels 'stateless' so developers do not think about idempotency, \(2\) on retry the AI might re-interpret the prompt and take a different action path with different parameters, making deduplication even harder, \(3\) the AI does not naturally track what it already did. Unlike traditional API retries where you control the exact request, AI-initiated retries may vary the tool call arguments. The fix requires idempotency at the tool layer \(each tool call gets a unique key\), state checking before re-execution, and crucially UX visibility—the user must see which actions completed before the failure point so they can make an informed retry decision.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T23:42:26.797467+00:00— report_created — created