You'll noticeTier: how much it should matter to you
3Useful: my rating, 1 to 5
3Signal: worth watching, 1 to 5
HooksArea: what it touches
ImprovementsKind: in v2.1.333,
ImprovementsSection of the release
What
A hook is a script or command you set up to run automatically at certain moments in a session. Some hooks can wake Claude and make it keep working instead of stopping. Claude Code now limits how many times in a row a hook can do this. The limit covers hooks on events such as:
The limit is 8 wakes in a row by default. You can set the environment variable CLAUDE_CODE_STOP_HOOK_BLOCK_CAP (a named value set in your shell before starting Claude Code) to a different number, or to 0 or less to remove the limit. When the limit is reached, Claude Code holds the hook's output until the next turn and shows a notice saying how many times in a row a background hook woke Claude.
Why
This stops a hook from trapping Claude in an endless loop. If your hooks are meant to wake Claude more than 8 times in a row, raise the limit with CLAUDE_CODE_STOP_HOOK_BLOCK_CAP.
How sure we are
One source agreesOne thing we can check says the same as this entry.
Anthropic's release notes agreeFixed an asyncRewake hook that keeps exiting quickly with code 2 waking Claude in an endless loop; wakes now stop after 8 in a row…