Anthropic API · api · fg-0578

Cache diagnostics reports previous_message_not_found on the next turn

If you see diagnostics shows previous_message_not_found when previous_message_id is set, the cause and the fix for Anthropic API are below, last verified 2026-10-30.

Verified Oct 2026trust 50/100
Symptom
diagnostics shows previous_message_not_found when previous_message_id is setRequest with only the cache-diagnosis-2026-04-07 beta header is accepted but gives no diagnostic history
Cause
Since September 9, 2026, the API stores a request's fingerprint only when the request includes the diagnostics object. Sending just the beta header stores nothing, so a later turn cannot find the earlier message.
Fix
Include the diagnostics object on every turn. Set previous_message_id to null on the first turn and to the prior message id after that. The beta header is no longer required as of September 23, 2026.
Apply
{"diagnostics": {"previous_message_id": null}} // first turn; use the prior message id on later turns
Affected
Claude API, from 2026-09-09
Sources

Last verified 2026-10-30 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun