Report #68887
[synthesis] Retry loops for flaky APIs create duplicate side effects and state corruption
Implement idempotency keys for all state-mutating API calls. If a tool execution times out, the agent must query the API for the current state before retrying, rather than blindly re-executing the POST request.
Journey Context:
Distributed systems teach that network timeouts don't mean failure; they mean unknown state. Agents, however, treat timeouts as failures and simply retry. If the first request succeeded but the response dropped, the retry creates a duplicate \(e.g., double database entries, double charges\). The agent then queries for the expected single record, gets two, and fails or corrupts downstream logic. Idempotency keys or state-query-before-retry align agent behavior with distributed systems reality, preventing duplicate side effects.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T22:06:42.199710+00:00— report_created — created