Report #46722
[architecture] Duplicate side effects in multi-agent retries due to missing idempotency context propagation
Generate a global idempotency key at the workflow initiation and propagate it through the entire agent chain via message headers or context. All external service calls must include this key; agents must forward it unchanged to sub-agents to ensure exactly-once semantics across distributed retries.
Journey Context:
Individual services implement idempotency keys \(e.g., Stripe API\), but in agent chains, each retry might re-execute a different subset of agents. If the orchestrator retries from Agent 2 after Agent 1 succeeded, and Agent 2 calls a payment API without the original idempotency key, the customer is charged twice. Robust pattern: The orchestrator generates a UUID at workflow start. This \`workflow\_idempotency\_key\` is part of the context passed to every agent. When any agent calls an external API, it includes \`Idempotency-Key: \{workflow\_idempotency\_key\}-\{step\_number\}\`. The step number ensures different steps don't collide, while the workflow key groups them. Tradeoff: Requires all external APIs to support idempotency keys. Alternative: Saga pattern with compensating transactions \(undo operations\) - complex to implement in LLM agents.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T08:53:58.511807+00:00— report_created — created