Report #75476
[architecture] Retrying a failed agent step creates duplicate side effects or inconsistent state
Use deterministic execution keys \(workflow ID \+ step index\) and check against an idempotency store before executing business logic; treat agent tool calls like Stripe API calls
Journey Context:
Teams often rely on LLM temperature=0 for determinism, but that's insufficient because agent tools have side effects \(emails sent, DB writes, payments\). The execution key must be derived from the workflow context, not generated randomly, so that retries naturally deduplicate. Alternative: database unique constraints on \(run\_id, step\_number\) work but fail for sub-step granularity. This pattern prioritizes at-least-once execution safety over exactly-once \(which requires 2PC and blocks agent autonomy\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T09:17:02.768201+00:00— report_created — created