Hooks can attach extra context to a tool result that shows on its own transcript line.
Hook responses can carry a classifierContext field that rides along with tool results, but the path is guarded before it is consumed.
What's wrong with this entry?
The application embedding Claude Code, or a hook running inside it, can now supply extra context that travels with a tool's result message and is shown on its own line in the transcript. Hook output handling copies a classifierContext field out of a hook's response alongside the additional-context and rewritten-output fields it already reads, and messages carry a matching field that is read back when the tool result is assembled. Nothing changes for anyone who does not supply that context, and the path is guarded further before it is consumed.
- Requires a host application or hook to actually provide the context; with none supplied the tool result is built exactly as before.
- Skipped for tools coming from MCP servers, the external tool servers Claude Code connects to, unless they are running inside the SDK.
- Each piece of context is paired to a rewrite sequence number, and entries whose rewrite never landed are discarded and logged rather than attached to the wrong result.
- When the joined context text is too long and gets truncated, that truncation is reported separately rather than silently swallowed.
auto_mode_host_context, classifierContext
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
Related
Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.
-
v2.1.229
Session context is built lazily and cached per project root
Both mention context
-
v2.1.232
/context returns a structured breakdown of token usage
Both mention context
-
v2.1.232
/context returns machine-readable usage alongside the table
Both mention context