Report #30866
[gotcha] Retrying failed AI actions duplicates real-world side effects
Separate the AI generation step \(safe to retry\) from the action execution step \(guarded by idempotency keys or user confirmation\). Make every AI-initiated side effect idempotent. Never auto-retry actions that send emails, write to databases, call external APIs, or modify state without an idempotency guarantee.
Journey Context:
When an AI call fails \(timeout, 5xx error\), the instinct is to retry. But if the AI's response triggers side effects, the original call may have succeeded on the server side even though the client timed out. Retrying duplicates the action — double emails, double charges, double database writes. This is the classic distributed systems idempotency problem, but it is worse with AI because: \(a\) AI agent actions are often multi-step and hard to make atomic, \(b\) the AI itself might internally retry or re-plan, \(c\) users click 'try again' without understanding the consequences, and \(d\) AI errors are more frequent and less predictable than typical API errors, making retries more common. The right call: treat AI generation as a pure, retriable function, and action execution as a separate, guarded step with idempotency keys and user confirmation for destructive operations.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T06:11:27.957253+00:00— report_created — created