Safer Idempotency-Key retries
FixAPI
- Concurrent retries no longer both run. A second request with the same
Idempotency-Keythat arrives while the first is still running now gets409 idempotency_in_progresswith aRetry-Afterheader, 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_reusedinstead of quietly replaying the earlier response. - Server errors aren't replayed. A
5xx(or429) 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.