⌨️--include-hook-events Flag
Also known as claude --include-hook-events, Hook events in the stream
It adds hook events to the output stream.
Think of it like
It is like a list that shows when each helper starts and ends their part.
Example
Emma's hook blocks some commands, and her CI run fails without saying why. With --include-hook-events, the stream shows the hook that said no.
Why it matters
When a hook changes what Claude does, the stream is where a script can see it.
Definition
Example code
bash
claude -p --output-format stream-json --verbose --include-hook-events "Run the tests"Common mistake
Key takeaways
- 1Start, output, end. For each hook.
- 2Some always shown. SessionStart, Setup.
- 3Not every hook. Sends a start event.