{"version":"2.1.268","anchor":"new-stream-json-result-index-field-live-for-pheadless-out","canonical_anchor":"new-stream-json-result-index-field-live-for-pheadless-out","heading":"New stream-json result_index field, live for -p\/headless output","tier":"use","area":"Stream JSON","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.268\/e\/new-stream-json-result-index-field-live-for-pheadless-out","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.268","markdown":"### New stream-json result_index field, live for -p\/headless output\n\nStreamed JSON output now includes a result_index showing delivery order\n\n**What**\n\nWhen 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.\n\n**Why**\n\nThis gives tools consuming streamed JSON output a reliable way to know the order in which results were delivered.\n\n- Area: Stream JSON\n- Names: `result_index`\n- Tier: Use it now\n- Useful: 3\/5\n- Signal: 2\/5"}