Report #69621
[architecture] Retrying failed agent chains causes duplicate side effects or inconsistent state
Generate deterministic idempotency keys at workflow entry and propagate through all agent boundaries using the same key for identical logical operations
Journey Context:
Teams often implement retries at each agent independently, generating new UUIDs per retry. When Agent A fails after calling external API, and Agent B retries A, the external API sees a new request and duplicates the charge/side-effect. In multi-agent chains, partial failures compound because each agent may have committed local state that becomes orphaned. The fix is to generate an idempotency key at the workflow start \(e.g., from initial request UUID plus operation semantic hash\) and pass it through all agent boundaries in a request context. Each agent uses this key for its idempotent operations against external systems. Tradeoff: requires all downstream services to support idempotency keys and consumes key storage \(usually 24-hour retention\). Alternative: Saga pattern with compensating transactions, but more complex and requires defining undo operations for every action.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T23:20:41.273599+00:00— report_created — created