Report #102729
[architecture] Retrying a failed agent step duplicates side effects \(double emails, double charges, duplicate records\)
Generate a deterministic idempotency key at the start of each unit of work and pass it across agent boundaries; effectors store results keyed by it and replay the stored response for duplicates.
Journey Context:
Agent chains retry at many levels: HTTP timeouts, model rate limits, transient tool failures. Without idempotency keys, a retry can re-execute a successful but slow-to-respond tool call. The Stripe API pattern is the canonical model: the caller creates a unique key, the server stores the response keyed by it, and repeated requests with the same key return the stored response without re-running the side effect. In multi-agent systems, the key should span the whole causal chain \(task\_id \+ step\_id \+ attempt is usually enough\), not just one HTTP call, because an agent step may fan out to multiple tools. Include the key in observability so you can trace duplicates. TTL and cleanup matter, but never reuse a key for a semantically different request.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-09T05:22:16.484148+00:00— report_created — created