What
Output from a tool host (a separate process that runs a tool on Claude Code's behalf) now arrives as its own system message in --output-format stream-json, so scripts can read it directly instead of parsing it out of an attachment.
Details
- The message carries the
tool_use_id, the host name and its working directory, an optional disposition and label, anunverifiedflag, and the output lines. - No flag gates it; it is emitted whenever the underlying attachment appears.
Evidence
tool_host_result
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
Names in the bundle--output-format stream-json
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Added since
A small documentation edit on Run Claude Code programmatically touched a line naming --output-format after this was published.
With `--output-format json`, the response payload includes `total_cost_usd` and a per-model cost breakdown, so scripted callers can track spend without consulting the [usage dashboard](/docs/en/costs). When you continue an earlier conversa…headless see the edit
Confirmed since
Anthropic's documentation has since written up --output-format, on Claude Code changelog.
* Fixed `permission_denials` in `--output-format stream-json` results omitting Read, Edit and Write calls blocked by a path-scoped deny rulechangelog see the edit
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agrees
Anthropic's documentation has since written up --output-format, on Claude Code changelog.