{"version":"2.1.199","anchor":"hook-additionalcontext-structured-json-output","canonical_anchor":"hook-additionalcontext-structured-json-output","heading":"Hook additionalContext: Structured JSON Output","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.199\/e\/hook-additionalcontext-structured-json-output","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.199","markdown":"### Hook additionalContext: Structured JSON Output\n\nHooks 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.\n\nBefore: Exit code 0 \u2192 stdout string shown to Claude\/subagent directly.\n\nAfter: Exit code 0 \u2192 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).\n\nHook descriptions updated:\n\n`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\"`)"}