When Claude Code runs headless (without its interactive screen, for example from a script) or through the SDK (the programming library for driving Claude Code from your own code), it reports a final result that includes a usage total. Usage is the count of tokens, the units of text the model processes and bills by.
That total used to come only from streamed responses, which arrive piece by piece as they are generated. Claude Code now also adds the usage of any assistant reply that was not already counted that way, so replies that arrive whole are included.
In the same part of Claude Code, system messages marked as informational are now held back from the output in some sessions.
If a response arrived without streaming, its tokens could be missing from the reported usage, which would make usage and cost look lower than they were. Scripts that read the usage figure from results may now see higher, more complete numbers.
It is not settled that this corrects under-reported usage in practice, or which sessions hide informational system messages.