{"version":"2.1.267","anchor":"repl-main-thread-cache-snapshots-can-now-hydrate-prefix-brea","canonical_anchor":"repl-main-thread-cache-snapshots-can-now-hydrate-prefix-brea","heading":"Prompt-cache diagnostics track a 'prefix-break hash' across sessions and forks","tier":"internal","area":"Caching","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.267\/e\/repl-main-thread-cache-snapshots-can-now-hydrate-prefix-brea","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.267","markdown":"### Prompt-cache diagnostics track a 'prefix-break hash' across sessions and forks\n\nClaude Code now tracks a prefix-break hash to diagnose prompt-cache-busting changes, including across restored sessions and forked agents\n\n**Unclear.** What user-visible effect this has, if any, isn't stated in the finding.\n\n**What**\n\n- The per-request cache-state tracker now computes and stores a `prefixBreakHash` (when hash-sample messages are available), used alongside existing message-hash tracking to help detect changes that break prompt caching. It also tracks a `summaryForks` map recording parent\/child cache state around session summarization and forking (capped at a limit), and reports cache-break telemetry (`cacheBroke`, `changeKinds`).\n\n- When restoring cached session state from disk, entries now compute a `hydratedHashRows` value from a stored `prefixBreakHash` when its salt is recognized, and reset `callCount`\/`cacheDeletionsPending` on restore.\n\n- The cache-diagnostics tracker also accepts a `baselineAgentId`, and when a forked agent has no prior baseline of its own, it seeds its baseline from its parent's cache state (`forkAgentId`\/`parentKey`) instead of starting cold, recording where the baseline came from (`baselineHashSource`: memory, disk, or none).\n\n**Why**\n\nThis gives better diagnostics for why prompt caching breaks, and it means forked or restored sessions no longer lose their cache-diagnostic history, reducing false alarms about the cache having broken.\n\n- Area: Caching\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 2\/5"}