Report #36635
[architecture] Duplicate side effects when agent chain retries after partial execution
Generate deterministic idempotency keys at workflow initiation and propagate through all agent boundaries; implement idempotency caches with business-logic-appropriate TTL at each stage
Journey Context:
Network timeouts or agent crashes trigger retries, but without idempotency, 'create order' operations execute twice. Simple deduplication on request ID fails because retries generate new request IDs. The solution comes from payment processing \(Stripe\): the client generates an idempotency key \(hash of workflow context \+ input\) that persists across retries. Each agent checks: 'Have I processed this key?' If yes, return cached result; if no, execute and store result. Keys must encompass the complete input state to avoid collisions. TTL should exceed maximum retry windows. This enables safe at-least-once execution semantics with exactly-once side effects.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T15:58:21.828011+00:00— report_created — created