Report #94353
[architecture] Retrying failed agent steps causes duplicate database writes or API calls due to non-idempotent operations
Implement deterministic idempotency keys \(UUID v5 based on input hash \+ agent version\) propagated through the chain with checkpoint persistence, ensuring replay produces identical outputs without duplicate side effects
Journey Context:
When Agent A fails after calling Stripe API but before saving state, retrying creates duplicate charges. Simple UUIDs don't help because the second execution generates a new UUID. Solution: generate idempotency keys deterministically from input parameters \(UUID v5\), pass them through the entire chain, and make downstream services idempotent. Combine with event sourcing/checkpointing so retries resume from exact failure point without re-executing prior successful steps—critical for 'exactly once' semantics in distributed agent workflows.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T16:57:21.287924+00:00— report_created — created