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 onlyEvidence
(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.
One source agreesOne thing we can check says the same as this entry.
Anthropic's release notes agree
Fixed SessionStart, Setup, and SubagentStart hooks silently hiding stderr when exiting with code 2 — the error is now shown in the…