Report #42163
[architecture] Designing agent chains where intermediate agents perform non-idempotent actions without deduplication
Treat the agent chain as a distributed saga. Generate a unique \`correlation\_id\` at entry. For any non-idempotent external call \(payment, booking, API mutation\), the agent must include this ID in an idempotency-key header \(e.g., \`Idempotency-Key: \`\). Store processed IDs in a durable log \(Redis/DB\) with TTL to filter duplicates on retries.
Journey Context:
Without idempotency keys, a retry after a network timeout between Agent A and B results in double-charging. This is the 'exactly-once' semantics problem in distributed systems. The Saga pattern ensures compensating transactions if the chain fails later. Tradeoff: requires persistent state for the idempotency log; external APIs must support idempotency keys.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T01:14:31.248115+00:00— report_created — created