Under the hoodTier: how much it should matter to you
2Useful: my rating, 1 to 5
2Signal: worth watching, 1 to 5
Cost TrackingArea: what it touches
New FeaturesKind: in v2.1.246,
New FeaturesSection of the release
What
Cost is now written to the session store as its own record keyed by session id, replacing global scratch fields that were keyed on the last session id and could therefore only restore the cost of whichever session ran most recently.
Details
The record is schema-checked and holds the session id, total cost in USD, API and tool durations, lines added and removed, per-model usage and a flag for models with unknown pricing.
Written on exit, read back per session on resume, merged last-wins, and kept with "always" retention so it is not pruned.
Whether the record gets emitted at all depends on a guard whose definition is renamed across modules and does not resolve; the merge and retention behaviour is unconditional.
Evidence
cost-state
Strings lifted out of the shipped bundle, so the claim above can be checked against them.