Use it now
Streamed JSON output now includes a result_index showing delivery order
What
When running Claude Code in headless or -p (print) mode with streamed JSON output, both successful and error result objects can now include a result_index field. This field is actually populated, counting up for each result delivered during a run.
Why
This gives tools consuming streamed JSON output a reliable way to know the order in which results were delivered.
Names in the bundleresult_index
Documented inapi/api/beta