Report #96228
[architecture] Agent retries and duplicate task assignments causing duplicate side effects — double writes, double emails, double API calls
Design every agent action with side effects to be idempotent. Use idempotency keys for API calls, conditional writes for database updates, and deduplication logic for message processing. Treat every action as if it might be executed twice.
Journey Context:
In multi-agent systems, tasks get retried \(network failures, timeouts\), agents get duplicate assignments \(orchestrator bugs\), and handoffs get re-sent \(at-least-once delivery\). If actions are not idempotent, you get duplicate database rows, double emails, and conflicting API calls. This is exactly the idempotency problem in distributed systems, but worse because LLM agents are non-deterministic — they might take slightly different paths on retry, making duplicate detection harder than simply checking for identical requests. The fix: treat every side-effecting action like a distributed systems write. Use idempotency keys, make writes conditional \(only if status is PENDING\), and log action IDs for deduplication. Temporal.io's workflow pattern for AI agents explicitly models this by tracking workflow execution IDs to prevent duplicate runs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T20:06:12.044250+00:00— report_created — created