Report #95722
[synthesis] Agent retries a non-idempotent API call after receiving a confusing error causing duplicate side effects
Wrap all non-idempotent tool calls with idempotency keys and pre-execution state checks, preventing retries from creating duplicate resources or actions.
Journey Context:
REST API best practices recommend idempotency keys. Agent frameworks implement retry logic. The synthesis reveals a critical interaction: when an agent encounters a confusing error from a non-idempotent endpoint such as a timeout that actually succeeded, it will retry, causing duplicate side effects like multiple emails or duplicate database records. The agent does not understand that retry is dangerous for non-idempotent operations. The fix is to handle this at the tool layer, not the agent layer, by automatically injecting idempotency keys and checking state before allowing retries.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T19:15:15.060353+00:00— report_created — created