Unclear The name of the new field is not known.
What
When Claude Code runs without its interactive screen, for example from a script or through the SDK (the toolkit for driving Claude Code from your own program), it writes a result message at the end of each piece of work. These result messages can now carry a field called model_usage_since_last_result, placed next to the existing result_index.
- It gives usage and cost, broken down per model, for the calls this process counted since it wrote its previous result.
- It is meant to be added up across a conversation.
- It is set in
stream-jsonoutput and in--sdk-urlruns, not injsonortextoutput. - It only appears when a value is available for it.
Why
Previously only result_index was added. If you consume Claude Code's output from your own program, you can now total usage and cost for a conversation by summing this field from each result, instead of working out differences between running totals.
The name of the new field is not known.