Follow Discord
Sweep 06 Nov 2026 · 01:32Z Build v2.1.319 537 read Stable v2.1.311 Latest v2.1.318 Next v2.1.319 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.277 ·

New SDK query() usage/cost fields get detailed docs

SDK docs now spell out that query() usage and cost totals accumulate across turns and reset on /clear

Under the hood Internal Changes
JSON All of v2.1.277
Under the hoodTier: how much it should matter to you
1Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
SDKArea: what it touches
Internal ChangesKind: in v2.1.277,
Internal ChangesSection of the release
What

The descriptions for the SDK's query() result fields covering model usage and total cost have been expanded. They now explain that per-model token totals (modelUsage) and the cumulative estimated cost (totalCostUsd-like field) both accumulate across turns within a streaming session, and reset when /clear is used to start a new conversation.

Why

This clarifies for SDK users exactly what window of activity these numbers cover, so a running cost or usage total isn't mistaken for a single-turn figure or misunderstood after a /clear.

How sure we are
One source agreesOne thing we can check says the same as this entry.
Anthropic's release notes agreeFixed sessions continued after /clear (restart, --continue, --resume) missing part of their first message when a SessionStart hook printed…

See this entry in the whole of v2.1.277 →

Feedback