Report #86241
[gotcha] Retry button on failed AI calls creates duplicate side effects
Attach an idempotency key to every AI API call that triggers downstream actions. Separate 'retry generation' from 'retry action' in the UI: if the AI succeeded but the action failed, only retry the action with the original AI output. Store AI outputs server-side keyed by request ID so retries can reuse them. Never re-call the AI on a naive retry.
Journey Context:
The naive retry pattern: AI generates content → code executes a side effect \(send email, create file, write to DB\) → the side effect fails → user clicks retry → the entire pipeline re-executes including the AI call. But the AI is non-deterministic: a retry produces a DIFFERENT response, not a re-execution of the same one. You've now sent two different emails or created two different files. This is especially insidious because the first attempt's AI output might have already been partially applied before the error. The counter-intuitive insight is that 'retry' in AI products is fundamentally different from retry in traditional software — you must decompose the pipeline and make each stage independently retriable with the same inputs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T03:20:35.072459+00:00— report_created — created