Follow Discord
Sweep 03 Nov 2026 · 22:27Z Build v2.1.318 536 read Stable v2.1.311 Latest v2.1.318 Next v2.1.318 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

cache-diagnostics changedbuild-with-claude/cache-diagnostics

Nearest release: v2.1.318, published 4 hours before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Recorded here
Lines+5added
Lines−5removed
From line 43 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits20to this page, all time

The whole hunk

from line 43, old and new numbered
/
lines
from line 43
4343 
4444## Basic usage
4545 
46Include the `diagnostics` object on every turn. The object is the opt-in: the API stores a fingerprint only for requests that include it. On the first turn, pass `"previous_message_id": null` to opt in without a prior message to compare against. On subsequent turns, pass the `id` from the previous response. The `cache-diagnosis-2026-04-07` beta header is no longer required, and requests that still send it work as before.
46Include the `diagnostics` object on every turn. The object is the opt-in: the API stores a fingerprint only for requests that include it. On the first turn, pass `"previous_message_id": null` to opt in without a prior message to compare against. On subsequent turns, pass the `id` from the previous response. The `cache-diagnosis-2026-04-07` beta header is no longer required, and requests that send it work as before.
4747 
4848<CodeGroup>
4949 ```bash cURL
from line 50
5050 # Turn 1: establish the cache and opt in to diagnostics
5151 curl -sS --fail-with-body https://api.anthropic.com/v1/messages \
5252 -H "x-api-key: $ANTHROPIC_API_KEY" \
53 -H "anthropic-version: 2023-06-01" \
53 -H "anthropic-version: 2026-10-21" \
5454 -H "content-type: application/json" \
5555 -d '{
5656 "model": "claude-opus-5-5",
from line 65
6565 # In the response, diagnostics: null means no divergence was found.
6666 curl -sS --fail-with-body https://api.anthropic.com/v1/messages \
6767 -H "x-api-key: $ANTHROPIC_API_KEY" \
68 -H "anthropic-version: 2023-06-01" \
68 -H "anthropic-version: 2026-10-21" \
6969 -H "content-type: application/json" \
7070 -d '{
7171 "model": "claude-opus-5-5",
from line 414
414414 # a null value means no divergence was found.
415415 curl -sS --fail-with-body https://api.anthropic.com/v1/messages \
416416 -H "x-api-key: $ANTHROPIC_API_KEY" \
417 -H "anthropic-version: 2023-06-01" \
417 -H "anthropic-version: 2026-10-21" \
418418 -H "content-type: application/json" \
419419 -d '{
420420 "model": "claude-opus-5-5",
from line 1035
10351035 
10361036## Limitations
10371037 
1038* **Claude API only:** Not available on Amazon Bedrock or Claude Models on Google Cloud (Google managed).
1038* **Claude API only:** Not available on Claude Models on Google Cloud (Google managed) or Amazon Bedrock.
10391039* **Limited retention:** Fingerprints for `previous_message_id` lookup expire after a short period. Run diagnostic comparisons between closely spaced requests.
10401040* **Same workspace:** The previous request must have run in the same organization and workspace. To check, compare the `anthropic-workspace-id` [response header](https://platform.claude.com/docs/en/api/overview#response-headers) on the two responses.
10411041* **Comparison horizon:** For very long conversations where the only change is deep in the message list, the response might be `unavailable` rather than a precise location.
Feedback