Report #52784
[gotcha] Retrying a failed AI request duplicates already-executed side effects
Separate AI generation from action execution with a two-phase pattern: AI generates a plan or output → user or system confirms → action executes. Add idempotency keys to every AI-initiated API call. Never auto-retry AI calls that trigger side effects without first checking whether the side effect already occurred. Show users what actions were already taken before offering retry.
Journey Context:
When an AI call times out or returns an error, the instinct is to show a 'Retry' button. But the AI may have already executed tool calls or triggered actions before the error—sent an email, written to a database, made a purchase. The retry then duplicates these actions. This is the classic distributed systems idempotency problem, but it bites especially hard in AI UX because: \(1\) AI calls are slow and error-prone, so retries are common; \(2\) users click 'retry' assuming it's safe like refreshing a page; \(3\) the AI's tool use is often invisible to the user, so they don't know what side effects might have already occurred. The fix is architectural: never let an AI call be both a generation step and an execution step in the same transaction.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T19:05:34.082518+00:00— report_created — created