Result messages sent over the SDK/stream-json transport now carry a per-session result_index number
Outgoing 'result' messages on the SDK and stream-json transport (the machine-readable output formats used by tools and scripts driving Claude Code) now get a result_index field, an incrementing number stamped on each message. A tracking mechanism ensures each message only gets stamped once, even if it passes through multiple times.
This gives anything consuming Claude Code's programmatic output a reliable way to tell results apart and put them in order, which is useful for tooling that processes a stream of results rather than reading them one at a time in a terminal.