Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.251 ·

SessionStart hooks get cache-cost data on resume and fork

SessionStart hooks now get cache age, context size and estimated re-caching cost on resume.

Use it now Notable New Features
JSON All of v2.1.251
Use it nowTier: how much it should matter to you
4Useful: my rating, 1 to 5
4Signal: worth watching, 1 to 5
HooksArea: what it touches
New FeaturesKind: in v2.1.251,
What probably matters to youSection of the release
What

When a session starts by resuming or forking, the SessionStart hook payload now includes seconds_since_last_response, context_tokens, prompt_cache_likely_expired, and estimated_cache_write_usd. A hook can use these to judge whether the prompt cache has lapsed and what re-caching the context will cost before doing anything expensive.

Details
  • Present for SessionStart events whose source is resume or fork.
  • The elapsed-time field is measured from the resumed transcript's last assistant response.
Evidence

resume/fork: seconds since the resumed transcript's last assistant response

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

Read from
Names in the bundleSessionStartseconds_since_last_responsecontext_tokensprompt_cache_likely_expiredestimated_cache_write_usd
Since it was published

The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.

Added since A small documentation edit on Hooks reference touched a line naming SessionStart after this was published. The same wait applies at launch, including a resumed session: a prompt you send while SessionStart hooks are still running doesn't reach Claude until they finish. hooks see the edit
Confirmed since Anthropic's documentation has since written up SessionStart, on Claude Code changelog. * Improved `--continue` / `--resume`: the conversation appears immediately instead of waiting for SessionStart hooks, and the first message no longer re-reads the whole transcript changelog see the edit
How sure we are
Two sources agreeTwo things we can check say the same as this entry.
Anthropic's documentation agreesAnthropic's documentation has since written up SessionStart, on Claude Code changelog.
Anthropic's release notes agreeAdded PreModelSwitch and PostModelSwitch hook events (block, confirm, or annotate a model switch); SessionStart resume hooks now receive…

See this entry in the whole of v2.1.251 →

Feedback