Skip to main content

Safer Idempotency-Key retries

FixAPI
  • Concurrent retries no longer both run. A second request with the same Idempotency-Key that arrives while the first is still running now gets 409 idempotency_in_progress with a Retry-After header, instead of running the write a second time.
  • A key is bound to one request body. Reusing a key with a different body returns 422 idempotency_key_reused instead of quietly replaying the earlier response.
  • Server errors aren't replayed. A 5xx (or 429) is no longer stored, so retrying with the same key runs the request again. Rejections (4xx) are replayed, including ones raised partway through a batch.
  • Replays are stored reliably. The response is saved before it is returned, and a key used again after it expires gets a fresh 24 hours.

The same rules apply to the idempotency_key argument on MCP write tools. See Idempotency.