Report #29040
[architecture] Retrying a failed multi-agent workflow step causes duplicate side effects \(duplicate emails, duplicate DB writes\)
Assign a unique idempotency key \(workflow ID \+ step ID\) at the start of the chain and pass it through. Downstream tools must check for an existing successful execution with this key before executing side effects.
Journey Context:
LLM calls are non-deterministic and network-prone; retries are inevitable. Without idempotency keys, if Agent C fails and the orchestrator retries from Agent B, Agent B's tool call \(e.g., 'send email'\) executes twice. Passing an idempotency key to tool payloads ensures that even if the LLM re-invokes the tool, the tool itself safely no-ops. Tradeoff: Requires stateful tool implementations and storage of key states, but guarantees safe retries and prevents costly external side effects.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T03:08:22.596809+00:00— report_created — created