Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.199 ·

Hook additionalContext: Structured JSON Output

Entry
JSON All of v2.1.199
EntryKind: in v2.1.199,
ImprovementsSection of the release

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.

How sure we are
One source agreesOne thing we can check says the same as this entry.
Anthropic's release notes agreeFixed SessionStart, Setup, and SubagentStart hooks silently hiding stderr when exiting with code 2 — the error is now shown in the…

See this entry in the whole of v2.1.199 →

Feedback