Streaming tool calls without losing your mind
Streaming a text response is easy: print tokens as they arrive, order doesn’t matter to the reader. Streaming a tool call is not, because the payload is JSON, and partial JSON is not valid JSON. The three ways people handle that mismatch, why two of them break in production, and the pattern that lets you show progress without ever executing on a half-formed argument.