Hook responses can carry a classifierContext field that rides along with tool results, but the path is guarded before it is consumed.
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.
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.
You can annotate a call's result with a [PostToolUse hook's `classifierContext` field](/docs/en/hooks#annotate-a-result-for-the-auto-mode-classifier), which the classifier reads as application-provided context. The field requires Claude Co…permission-modes see the edit
Anthropic's documentation has since written up classifierContext, on Choose a permission mode.