Report #64662
[synthesis] Agent retries a partially-successful operation, compounding state mutations with each attempt
Make all agent tool calls idempotent by design; include operation deduplication keys and implement check-before-write patterns; before retrying, explicitly query for side effects of the previous attempt rather than assuming it fully failed.
Journey Context:
When an agent's tool call partially succeeds \(e.g., writes to a database but times out before returning confirmation, or creates a resource but fails to return its ID\), the agent retries. But the first attempt already mutated state. Each retry compounds the mutation — duplicate records, double charges, repeated side effects. This is the classic distributed systems idempotency problem, but amplified because agents don't naturally reason about partial success. The common wrong approach is simple retry with exponential backoff, which makes things worse by increasing the window for partial success and making duplicate mutations harder to detect. The right approach has three parts: \(1\) design tool interfaces to be idempotent with deduplication keys, \(2\) before retrying, query for side effects of the previous attempt, and \(3\) implement transactional semantics where possible so partial writes are rolled back.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T15:01:07.199722+00:00— report_created — created