Report #68874
[architecture] Retrying a failed agent step causes duplicate side effects like sending multiple emails
Assign a globally unique idempotency key \(workflow\_id \+ step\_id\) at the orchestrator level and pass it to tool-executing agents, enforcing idempotency at the external API boundary.
Journey Context:
Agents use tools that mutate state. If an agent times out or fails, the orchestrator retries. If the tool already executed but the network failed before returning the result, the retry duplicates the action. LLMs are stateless; idempotency cannot be enforced at the LLM layer. It must be enforced at the tool/API layer via keys, ensuring safe retries without side effects.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T22:05:20.072558+00:00— report_created — created