Report #73472
[architecture] Retrying a failed agent step causes duplicate side effects in multi-agent workflows
Assign a deterministic idempotency key \(e.g., workflow\_run\_id \+ step\_id\) to every agent invocation that performs a side effect, and validate it at the execution layer before committing the action.
Journey Context:
In distributed systems, 'exactly-once' delivery is a myth; you get 'at-least-once'. When an orchestrator dispatches a task to an agent and the network drops the response, it must retry. If the agent writes to a database or sends an email, the retry duplicates it. Passing an idempotency key allows the agent's tool to check if the operation already occurred. Tradeoff: Requires stateful tracking of keys on the tool side, but essential for financial or mutable operations where duplicate execution is unacceptable.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T05:55:11.985075+00:00— report_created — created