fine-grained-tool-streaming changedagents-and-tools/tool-use/fine-grained-tool-streaming
Nearest release: v2.1.304, published under an hour after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+2added
Lines−3removed
From line
63
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits11to this page, all time
The whole hunk
from line 63, old and new numbered
/
from line 63
6363 ```
6464
6565 ```bash CLI
66 ant messages create --stream --format jsonl <<'YAML' |
66 ant messages create --stream <<'YAML'
6767 model: claude-opus-5-5
6868 max_tokens: 65536
6969 tools:
from line 86
8686 - role: user
8787 content: Can you write a long poem and make a file called poem.txt?
8888 YAML
89 jq -rj 'select(.delta.type == "input_json_delta") | .delta.partial_json'
9089 ```
9190
9291 ```python Python
from line 468
469468 ```
470469</CodeGroup>
471470
472Every tab turns on fine-grained streaming for the `make_file` tool. The SDK tabs print each input fragment the moment it arrives, then print the complete accumulated input once the stream ends. The cURL tab shows the raw event stream, and the CLI tab uses `jq` to print just the fragments. Because the printed fragments join into the full tool input, the poem fills your terminal as Claude writes it:
471Each input fragment arrives the moment Claude writes it, and the fragments join into the full tool input, so the poem arrives piece by piece:
473472
474473```text wrap
475474{"filename": "poem.txt", "lines_of_text": ["The Wanderer's Journey", "", "I.", "", "Beneath the vast and star-strewn sky,", "Where silver moonbeams softly lie,", ...
No line in this hunk matches that.