Under the hood
Useful2 Signal0
SDK result fields now explain that usage covers only the main loop and costs are estimates.
What's wrong with this entry?
Anonymous. No account, no email.
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
usageis 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_usdandmodelUsage. - 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.