Source Intelligence

DisclaimerUnofficial, and not affiliated with Anthropic. Nearly all of this is read straight out of what ships: npm bundles, captured prompts, published docs. Anthropic's own notes go in verbatim, marked as theirs. The rest is my reading, and every entry carries the strings behind it. If one looks wrong, vote it down and say why.

All of v2.1.199 Home All releases olderv2.1.198 v2.1.200newer

Hook additionalContext: Structured JSON Output

Hooks that return exit code 0 now communicate with Claude through a structured additionalContext JSON field instead of plain stdout. This change applies to SubagentStart, PreToolUse, PostToolUse, and session-init hooks.

Before: Exit code 0 → stdout string shown to Claude/subagent directly.

After: Exit code 0 → stdout parsed as JSON; the additionalContext field from the parsed object is injected into Claude's context. Exit code 2 now routes stderr to the user only (previously stderr was ignored for blocking errors).

Hook descriptions updated:

Exit code 0 - JSON additionalContext shown to subagent
Exit code 2 - show stderr to user only
Other exit codes - show stderr to user only
Evidence

(search for "Exit code 0 - JSON additionalContext shown to subagent")

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

See this entry in the whole of v2.1.199 →