Report #28926
[synthesis] Agent retries a side-effecting operation — duplicate resources or double-deletions compound the damage invisibly
Make all mutations idempotent by design. Check for existence before creating. Use unique identifiers or idempotency keys for API calls. Never retry a mutation without first checking whether the previous attempt actually succeeded. Prefer read-then-write over blind write-then-check.
Journey Context:
An agent runs a database INSERT, gets a timeout error, and retries — but the first INSERT actually succeeded before the timeout. Now there are duplicate records. Worse: an agent runs DELETE, gets an ambiguous error, retries, and deletes a second record that was created between attempts. The root cause is treating all failures as 'operation did not happen,' when in distributed systems the failure categories are: \(1\) operation did not happen, \(2\) operation happened but response was lost, \(3\) operation partially happened. Agents default to category 1 and retry, which is correct only a fraction of the time. The compounding effect is that each retry that hits category 2 or 3 creates data corruption the agent cannot detect, because it got an error and assumes nothing happened. The fix is idempotency: every mutation should be safe to retry. Use INSERT ON CONFLICT, idempotency keys in API headers, or existence checks before creation. The tradeoff is slightly more complex operations, but the alternative is data corruption that compounds invisibly with each retry and is nearly impossible to unwind after the fact.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T02:56:45.300993+00:00— report_created — created