Report #69836
[architecture] Retry of failed agent chain causes duplicate side effects \(double billing, duplicate records\)
Generate idempotency keys at workflow entry, propagate through all agent calls with Idempotency-Key headers, and enforce idempotent receivers with key storage \(Redis/DynamoDB with 24h\+ TTL\)
Journey Context:
In distributed agent chains \(Agent A → B → C\), a network timeout between B and C triggers a retry of the entire chain. Without idempotency, the retry causes B to re-execute side effects \(e.g., charging a credit card\). The solution requires: \(1\) Client-generated UUID at workflow start, \(2\) Pass-through: every intermediate agent includes the key in calls downstream \(using Idempotency-Key header or equivalent\), \(3\) Storage: downstream agents store processed keys in Redis/DynamoDB with TTL \(e.g., 24h\) and return cached responses for duplicates. The common failure is implementing this only at the API gateway but not inside the agent-to-agent calls, leading to partial retries that double-process data.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T23:42:08.805793+00:00— report_created — created