For cache diagnostics, the API now stores a request's fingerprint only when the request includes the…
By Steven Van ·
Requests that send only the old beta header still work but store no fingerprint, so pair diagnostics with a null previous_message_id on the first turn.
The Anthropic API now stores a fingerprint for cache diagnostics only when a request includes the diagnostics object. A request that sends just the cache-diagnosis-2026-04-07 beta header on its own is still accepted, but no fingerprint gets saved for it.
A later turn that points previous_message_id at one of those header-only requests now gets back previous_message_not_found instead of a comparison. To avoid that, include the diagnostics object on every turn, passing "previous_message_id": null on the first one.