Technical guide
Safe retries: state, deduplication and recovery
Retry logic becomes reliable only when success, unknown outcome and business rejection are different states.
Marvin Kamp2026-08-11
Not every failure is retryable
A timeout after sending has an unknown outcome; validation failure is final; 429 requires controlled backoff. One generic retry loop mishandles all three.
Idempotency as a contract
The client supplies a stable key, the server binds it to the request hash and stores the result. Reusing the key with different content is rejected.
Recovery is a product feature
Operators need correlation, state history, safe replay, rationale and audit. Without that surface, recovery turns into a database operation.