Build1 distinct publisher3 min readUpdated
A new beta fingerprints each request and names the first structural divergence from a prior response id. Until now the only signal was cache_read_input_tokens going to zero.
The Engineer · Build desk

Compiled by The EngineerSomething wrong?How this is made
Anthropic has documented a beta, `cache-diagnosis-2026-04-07`, in which the API stores a lightweight fingerprint of each request keyed by the response id, then compares a later request against it and attaches a `diagnostics` object naming the first point of divergence [5][6][11]. It matters because the same page concedes that without this, the only signal of a cache miss was `usage.cache_read_input_tokens` dropping to zero, with no indication of what changed [3].
That is the part worth dwelling on. Prompt caching pays only when the beginning of a prompt is byte-for-byte identical to a recent request [1], and the documentation lists the ordinary ways that breaks: a reordered tool, a timestamp interpolated into a system prompt, an edit to an earlier message, each of which can silently invalidate the cache [2]. A silent invalidation shows up as latency and spend, not as an error, so teams have been reverse-engineering their own prompt assembly from a single counter.
The mechanism is a differ, not a cache accountant. You pass the previous response id as `diagnostics.previous_message_id`; the API rebuilds the fingerprint for the new request and compares [6][4]. The reported divergence is one of four categories: the model, the system prompt, the tools, or the message history [4][15]. That is a category, not an offending byte, and the supplied documentation points to a separate response-format section for the possible values rather than enumerating them [12]. Anthropic also states plainly that the comparison is about request structure and is independent of whether the cache actually hit, with a separate section on reading diagnostics alongside `usage` [8]. So this tells you your two requests differ; confirming the cost consequence still means reading the token counters.
The example code has three branches, and the third is the interesting one: `diagnostics` absent means no divergence detected, a `diagnostics` object with `cache_miss_reason` set to null means the comparison is still pending, and otherwise you read `cache_miss_reason.type` [9]. A pending state in a synchronous response path implies the comparison does not always land before the answer does. Treat it as a log line to aggregate, not a guardrail to branch on.
Operationally it is intrusive in a small way: the beta header goes on every turn, the first turn passes `"previous_message_id": null` to opt in with nothing to compare against, and every subsequent turn carries the latest response id forward [10][14]. Streaming users get `diagnostics` on the `message_start` event [13]. On the data side, Anthropic says fingerprints contain only hashes and token-count estimates, never raw prompt content, are retained for a limited time, are scoped to your organization and workspace, and are not used for any other purpose [7].
What to watch. The retention window is described only as "a limited time" and is not quantified in the documentation supplied [16], which matters if you intend to diff a request against something from yesterday's run rather than the previous turn. Watch how often the pending branch fires under real traffic, because a differ that answers late is useful for weekly cost review and useless for a retry decision. And watch whether the four categories get finer: knowing the divergence is in "the message history" narrows a bug in a long agent transcript by very little.
Follow any of these and your For You feed starts watching them — no settings page required.
Ranked by verification strength, evidence, and original report placement.
Pass the id of your previous response and the API compares the two requests and tells you where they diverged: the model, the system prompt, the tools, or the message history.
On the next request you include that id as diagnostics.previous_message_id; the API rebuilds the fingerprint for the new request, compares it against the stored one, and attaches a diagnostics object to the response describing the first point of divergence.
The sample code branches three ways: if diagnostics is None it prints "No divergence detected"; if diagnostics.cache_miss_reason is None it prints "Comparison still pending"; otherwise it prints cache_miss_reason.type.
Send the beta header on every turn; on the first turn pass "previous_message_id": null to opt in without a prior message to compare against, and on subsequent turns pass the id from the previous response.
The documentation refers readers to a Response format section for the possible diagnostics values rather than listing them in the passage supplied.
In a multi-turn conversation, carry the latest response id forward as previous_message_id on every turn; the first iteration passes null and each subsequent iteration passes the id from the previous response.
Evidence-backed comparisons of source perspectives and observed adoption signals. Read the methodology
Which Builder, Operator, and Investor concerns the observed source mix emphasized—not a truth score.
Evidence, demonstrated adoption, hype gap, incentives, and confidence are assessed independently, each on its own current evidence. How these are measured.
Primary-source and specific, but single-sourced
The claims rest on an authoritative first-party specification with unusually concrete detail: a named beta identifier, request and response field names, worked non-streaming, streaming and multi-turn code, a documented response shape with cache_miss_reason as a discriminated union, and explicit caveats about pending and unavailable comparisons. That is strong for what it is — documentation of intended behavior. It is not verification: nothing independent confirms the feature behaves as described, the retention period is left unquantified, and the divergence value list is deferred to another section not supplied.
Availability documented, uptake unknown
The supplied material establishes only that the beta exists and is documented. There is no usage disclosure, customer deployment, benchmark, or telemetry indicating that anyone outside Anthropic has enabled cache-diagnosis-2026-04-07, and inferring uptake from a documentation page would be a guess.
Mechanics understated by the doc, framing slightly stretched by the headline
The documentation itself is restrained: it promises a structural comparison, explicitly disclaims that it tells you whether the cache hit, and warns that only the earliest divergence is reported. The overstatement sits in the cluster's framing of a 'concession' and of a solved problem, when what is evidenced is a beta whose effectiveness, overhead, and uptake are entirely unmeasured, and whose privacy and retention assurances are self-reported. The gap is small and one-directional rather than severe.
First-party vendor documentation of its own beta
Every claim originates from the vendor shipping the feature, on the vendor's own docs domain. Anthropic has a direct interest in presenting the beta as the fix for a caching pain point that affects its own API bills and customer satisfaction, and in reassuring customers about fingerprint handling. The privacy, scoping, and 'not used for any other purpose' assertions are exactly the kind of statement that no supplied source independently checks.
High on mechanics, low on impact
Confidence is high that the API surface, opt-in pattern, streaming delivery point, and response states are as stated, because a primary specification with code is the right source for those facts. Confidence is low on everything downstream — whether the diagnostic reliably identifies real-world cache misses, what it costs in overhead, how long fingerprints persist, and whether anyone is using it — because the cluster has one publisher, no adoption data, and unquantified retention.
leadership
The AI bill nobody reconciles: cost per finished task, not per million tokens1 distinct publisher
invest
Korea cuts one of four sovereign AI teams, and usability did the cutting1 distinct publisher
build
Opus 5 absorbed your verify prompts. The reading is still on your desk.1 distinct publisher
build
Claude Code's new default is a confession: the approval prompt was never a control1 distinct publisher
Distinct publishers with included, body-backed reporting in this cluster.
1 article · August 17, 2026