The terminal result event — present in BOTH --output-format shapes (a {type:"result", …} line in stream-json, the single object in json), or null. The seam for the final answer + turn count without parsing twice.
result
--output-format
{type:"result", …}
json
The terminal
resultevent — present in BOTH--output-formatshapes (a{type:"result", …}line in stream-json, the single object injson), or null. The seam for the final answer + turn count without parsing twice.