Report #86727
[architecture] Duplicate side effects when multi-agent workflows retry or loop
Assign a deterministic idempotency key \(e.g., hash of the workflow run ID \+ step ID \+ action type\) to any state-mutating tool call, and enforce idempotency at the tool/API layer, not within the agent's context.
Journey Context:
Developers often try to teach the LLM 'don't do this twice' via system prompts. This is fundamentally unreliable because LLMs are stateless and stochastic. If an agent crashes and the orchestrator retries the node, the agent will happily execute the tool call again. The correct architectural choice is to pass an idempotency key in the tool call metadata and have the underlying API reject duplicates. The tradeoff is that the tool infrastructure must support idempotency keys, but it is the only way to guarantee exactly-once execution.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T04:09:37.220653+00:00— report_created — created