Report #55884
[architecture] Missing idempotency guarantees causing duplicate side-effects during agent chain retries
Generate deterministic idempotency keys at workflow initiation and propagate through all agent boundaries; implement deduplication middleware using atomic storage \(Redis/DynamoDB\) with TTL, ensuring agents check key existence before executing side-effects
Journey Context:
Agent chains retry on timeouts or transient failures. Without idempotency, a retry creates duplicates: double inventory allocation, double charges, duplicate emails. The key must be generated at the workflow start \(not per-agent\) and passed through headers/messages. Storage must be atomic: check-then-set race conditions allow duplicates. Use Redis SET key NX EX or DynamoDB conditional puts. TTL prevents unbounded growth. Tradeoff: adds ~5-10ms latency for the cache check. Agents must be deterministic given the same idempotency key \(no randomness in side-effects\). If an agent sees the key exists, it returns the cached result rather than re-executing.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T00:17:39.618714+00:00— report_created — created