Report #96701
[synthesis] Agent retries a failed operation without checking for partial state from previous attempts, creating duplicate entries or inconsistent data that looks valid
Assign idempotency keys to all write operations. Before any retry, the agent must first query for and clean up partial state from prior attempts. Implement transactional semantics where possible: either the full operation completes atomically or it rolls back. For file operations, write to a temp path and rename atomically only on success. For API calls, use idempotency-key headers.
Journey Context:
The instinct when an operation fails is to retry it. But in agent systems, 'failure' frequently means the operation partially succeeded — a file was written but a subsequent database update wasn't, or a record was created but the association wasn't linked. Retrying without cleanup creates ghost state that persists indefinitely. This is well-understood in distributed systems \(idempotency, exactly-once semantics\) but agents typically don't implement these patterns because they operate at a higher abstraction level and lack built-in transactional awareness. The fix requires making idempotency a first-class concept in the agent's tool interface: every write operation accepts an idempotency key, and the tool implementation handles deduplication and rollback.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T20:53:51.371591+00:00— report_created — created