Report #94503
[architecture] Retrying failed agent steps causes duplicate side effects like multiple API calls or database writes
Attach a globally unique idempotency key \(workflow\_id \+ step\_id\) to the shared state, and enforce idempotency checks at the tool execution layer, not the agent orchestration layer.
Journey Context:
Orchestrators will retry a failed node. If an agent calls an external tool \(e.g., send email\) and the orchestrator times out, the retry will send a second email. The LLM cannot enforce idempotency. The tool itself must recognize the idempotency key and return the cached result if the step was already executed.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T17:12:22.971326+00:00— report_created — created