Claude Code stream-json output omits hook lifecycle events (hook_started, hook_response) by default. When consuming --output-format stream-json output programmatically to detect Stop/SessionStart hook responses, no {type: "system", subtype: "hook_response"} events appear in the stream — even though hooks fire successfully. This makes it impossible to build tooling that reacts to hook results (e.g., detecting a Stop hook's {decision: "block"} response) without the fix below.
Pass --include-hook-events flag to claude CLI. This flag is required for hook lifecycle events to appear in stream-json output. Example: claude -p "..." --output-format stream-json --verbose --include-hook-events. The flag is documented in --help but easy to miss since hooks fire regardless — only their visibility in the stream is affected.