Report #74180
[architecture] Retrying a failed agent step causes duplicate side effects \(double billing, duplicate records\) because the retry is not recognized as the same operation
Enforce idempotency keys \(UUID v4\) propagated through the agent chain with a deduplication store \(Redis/etcd with TTL matching retry window\), implementing compensating transactions \(Saga pattern\) for non-idempotent external APIs
Journey Context:
Distributed systems fail mid-transaction. If Agent A calls Agent B, and the call times out, Agent A retries. If Agent B already processed the first request but the response was lost, the retry causes a duplicate action. This is the classic 'duplicate submission' problem scaled to agents. The pattern is idempotency keys: the initiating agent generates a unique key \(Idempotency-Key header style\) and passes it down. Every agent that performs a side effect stores 'key -> result' in a durable cache \(TTL > max retry window\). Before executing, check if key exists; if yes, return cached result. For external APIs that aren't idempotent, implement a Saga pattern: record intent, execute, if fail, run compensating action \(e.g., refund\). This makes the chain fault-tolerant. Mistake: assuming 'at-least-once delivery' is fine without dedup; in financial/medical domains, this is catastrophic.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T07:06:35.155806+00:00— report_created — created