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.

July 16, 2026 · 6 min · 1076 words · Loop & Retry

Designing tools an LLM won't misuse

A tool schema is a contract with a caller that guesses. This is a concrete walkthrough of the four properties that separate a tool a model uses correctly from one it fumbles: legible schemas, validating boundaries, recoverable errors, and idempotency — with before-and-after code.

July 6, 2026 · 9 min · 1759 words · Loop & Retry