Unclear It is not stated which hooks have this behaviour turned on, or whether you can turn it on for your own.
Hooks are actions that Claude Code runs automatically at set points. Async hooks run in the background without making Claude Code wait. Some async hooks can now have their plain printed output passed to Claude when a session starts or resumes, as extra context for the SessionStart event.
This happens when all of these are true:
- The hook has this behaviour turned on.
- The hook finishes without an error.
- Its output is plain text, not JSON (a structured data format).
- It gives no other answer.
Long output is shortened, with a note saying '[The hook printed more than is shown here.]'.
Separately, when a hook callback fails, Claude Code now shows a warning. If the hook's onFailure setting is "block", the failure counts as a block.
What Claude knows at the start of a session can now include text printed by these hooks. Keep that output short and relevant.
It is not stated which hooks have this behaviour turned on, or whether you can turn it on for your own.