Report #49710
[architecture] Retried or duplicated agent requests cause double-booking, duplicate charges, or conflicting side effects
Generate a unique Idempotency-Key \(UUIDv4\) at the workflow entry point and propagate it through all inter-agent HTTP/gRPC headers; receiving agents must persist processed keys and their responses for 24h, returning the cached response for duplicate keys without re-executing business logic, effectively making the operation idempotent across the distributed chain.
Journey Context:
Agent networks are inherently unreliable: network timeouts trigger client retries, message queues deliver duplicates, or agents crash and restart mid-flow, causing the same task to be processed multiple times. Without idempotency, a 'book flight' or 'process refund' agent might execute twice, creating irreversible duplicate external state. Simple deduplication on content hashes is fragile because LLM outputs vary slightly even for identical inputs \(temperature > 0\), and timestamps are unreliable in distributed systems. The Idempotency-Key pattern, formalized in payment APIs \(Stripe\) and the IETF draft, provides a client-generated identifier that acts as a synthetic transaction ID. The critical insight for multi-agent systems is end-to-end propagation: the key must flow through the entire chain in headers, not just the first hop, creating a 'distributed transaction' context. Agents must treat the key as part of their state machine, requiring persistent storage \(e.g., Redis, SQL\) to map keys to responses. The tradeoffs are storage costs \(caching responses for 24h\+\), the bootstrap problem \(how to handle agents that don't yet support the header\), and complexity in key lifecycle management \(when to purge\). This is non-negotiable for agents performing non-reversible external actions \(payments, reservations, data deletion\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T13:55:21.934158+00:00— report_created — created