Automate actions with hooks changedhooks-guide
Upstream edited this page at 5 Oct 2026 00:58 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 5 Oct 2026 01:07 UTC.
Upstream edited
Recorded here
Lines+1added
Lines−1removed
From line
1,001
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits32to this page, all time
The whole hunk
from line 1001, old and new numbered
/
from line 1001
10011001
10021002Claude keeps working instead of stopping, then ends the turn with a warning that the Stop hook blocked too many consecutive times.
10031003
1004Claude Code overrides a Stop hook after it blocks eight times in a row without progress. Your hook script needs to check whether it already triggered a continuation. Parse the `stop_hook_active` field from the JSON input and exit early if it's `true`:
1004Claude Code overrides a Stop hook after it blocks eight times in a row with no tool call from Claude in between. Your hook script needs to check whether it already triggered a continuation. Parse the `stop_hook_active` field from the JSON input and exit early if it's `true`:
10051005
10061006```bash theme={null}
10071007#!/bin/bash
No line in this hunk matches that.