Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Streaming tools force the wrapper to choose when to stop reading: timeout, size, or sentinel, each with its own failure mode, and to pair the cutoff with a continuation tool the model can call to resume.
Imagine listening to a friend tell a story while you have a meeting in five minutes. You cannot make them stop mid-sentence and you also cannot wait for the ending. You have three reasonable choices. Set a timer and politely interrupt when it goes off. Decide ahead of time you will leave after a certain number of details. Or wait for a natural pause (the end of a chapter) and exit there. Each one cuts the story off in a different way, and the good move is to also promise your friend you will come back later and pick up where you left off. Streaming tools are exactly this: pick a stopping rule, accept that some endings will be jagged, and give the model a way to resume.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
Define the problem: streaming tools break the synchronous-completion assumption. Name the three stopping criteria (timeout, size, marker) and one failure mode each. Describe the layered pattern: read until the first of marker / size / timeout fires, report which one stopped the read. Cover the continuation handle: stream_id parked in agent state, continue_stream and stop_stream as first-class tools. Touch on back-pressure (producer faster than consumer) and stall detection (producer stops emitting). Close with the 2026 production examples (Claude Code, Cursor, Aider) and the contrast with batch-style synchronous tools.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Treating streaming as a synchronous tool by buffering the whole stream, the buffer either blows the budget or holds the agent for minutes; the policy choice is structural.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.