Source Intelligence

DisclaimerUnofficial, and not affiliated with Anthropic. Nearly all of this is read straight out of what ships: npm bundles, captured prompts, published docs. Anthropic's own notes go in verbatim, marked as theirs. The rest is my reading, and every entry carries the strings behind it. If one looks wrong, vote it down and say why.

All of v2.1.223 Home All releases olderv2.1.222 v2.1.224newer

SDK result schema documents what usage, total_cost_usd and modelUsage actually cover

Under the hood
Useful2 Signal0
SDK

SDK result fields now explain that usage covers only the main loop and costs are estimates.

total_cost_usdmodelUsage/clear
What

The result schema now spells out the scope of its accounting fields, so callers stop reading usage as a whole-session total.

Details
  • usage is described as "MAIN AGENT LOOP ONLY — excludes Task subagent, sidechain, and auxiliary model calls, and is per-turn in streaming-input sessions. Prefer modelUsage for token/cost accounting."
  • Both the success and error result schemas attach descriptions to total_cost_usd and modelUsage.
  • The cost text explains it is "Cumulative estimated cost in USD for this query() call", that a mid-session /clear resets the running total, and that it is "An estimate, not a billing statement."
  • Documentation only: no runtime numbers changed.
Evidence

An estimate, not a billing statement.

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

See this entry in the whole of v2.1.223 →