Report #37960
[architecture] Retrying failed agent handoffs causes duplicate side effects in external systems
Separate the planning phase from the execution phase at every agent boundary. Agent outputs should produce an execution plan \(intent\), not directly execute side effects. Validate the plan before execution. Attach an idempotency key to every external action, and ensure downstream services honor it. On retry, reuse the same key.
Journey Context:
In multi-agent pipelines, if Agent A produces output that triggers an external API call and the handoff to Agent B fails, naive retry re-executes the side effect — double email, double charge, double deployment. This is the distributed systems dual-write problem applied to agent architecture. The fix is the same pattern Stripe uses: idempotency keys and plan-then-execute separation. Agents produce intents; a deterministic executor carries them out with idempotency guarantees. If the handoff fails, you retry the handoff, not the execution. Tradeoff: requires external systems to support idempotency keys, and the plan/execute split adds architectural complexity and latency. But without it, retries are unsafe, which means you can't retry at all — and no-retry pipelines are fragile.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T18:11:47.900258+00:00— report_created — created