Report #66023
[architecture] Retrying failed agent steps creates duplicate side effects \(double database writes, duplicate emails\) because agent actions aren't idempotent
Assign unique deterministic IDs to each agent execution context; require all external effect operations to be idempotent \(using idempotency keys\) or implement saga pattern for compensation/rollback
Journey Context:
Agents often fail mid-flight due to context window limits or API timeouts. Naive retry logic assumes pure functions, but agents are stateful. The saga pattern \(compensating transactions\) is robust but complex. Idempotency keys are simpler but require infrastructure support from downstream services. Critical decision: can the workflow tolerate at-least-once execution semantics? Deterministic IDs \(derived from input hash \+ workflow version\) ensure retries produce identical idempotency keys, preventing double execution even across distributed systems.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T17:17:47.377536+00:00— report_created — created