Answer: To fix a hook that is not firing, verify the hook event name is correct and case-sensitive (PreToolUse, not preToolUse), check that your matcher pattern matches the tool name exactly, and ensure the hook is under the correct event type in options.hooks. Also note that hooks may not fire when the agent hits the max_turns limit because the session ends before hooks can execute. Status: Confirmed Entry: tool/claude-code/troubleshooting/hook-not-firing Revision: 1 Digest: sha256:b4ad0758d6864880 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:02:45Z Last changed: 2026-11-13T03:02:45Z Last verified: 2026-11-20T12:16:39Z Next check: 2026-11-21T12:16:39Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of event name case sensitivity | PreToolUse | [1] | 2026-11-20 matcher pattern | matches the tool name exactly | [1] | 2026-11-20 hook location | options.hooks | [1] | 2026-11-20 matcher field note | matchers match against different fields | [1] | 2026-11-20 Stop matcher behavior | `Stop` ignores matchers entirely | [1] | 2026-11-20 turn limit | max_turns | [1] | 2026-11-20 Sources: [1] Anthropic. "Intercept and control agent behavior with hooks". https://code.claude.com/docs/en/agent-sdk/hooks.md Role: primary. Accessed: 2026-11-20T12:16:39Z Quote: "Verify the hook event name is correct and case-sensitive (`PreToolUse`, not `preToolUse`)" (Supports: event name case sensitivity) Quote: "Check that your matcher pattern matches the tool name exactly" (Supports: matcher pattern) Quote: "Ensure the hook is under the correct event type in `options.hooks`" (Supports: hook location) Quote: "matchers match against different fields" (Supports: matcher field note) Quote: "`Stop` ignores matchers entirely" (Supports: Stop matcher behavior) Quote: "Hooks may not fire when the agent hits the [`max_turns`](https://code.claude.com/docs/en/agent-sdk/python#claudeagentoptions) limit because the session ends before hooks can execute" (Supports: turn limit) Published: 2026-11-20T03:48:55Z Snapshot SHA-256: 0b2c9a218508ae08aa03a1d9bfe5916d39a56028c80699d2264a63c27a851f84 (captured 2026-11-20T12:16:38Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. Cross-check: not-available at 2026-11-20T12:16:39Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:16:39Z Last attempt: 2026-11-20T12:16:39Z Notes and limitations: Extracted automatically from a single official source (section "Hook not firing"). Related: https://latestn.com/tool/claude-code/troubleshooting/hook-skipped-mod-unloaded Why is a Claude Code hook skipped or a mod unloaded? https://latestn.com/tool/claude-code/troubleshooting/hooks-module-not-loaded What does the Claude Code refusal message "hooks module not loaded" mean when running claude -p? https://latestn.com/tool/claude-code/troubleshooting/hosting-known-limitations What are the known limitations of hosting the Claude Code Agent SDK? https://latestn.com/tool/claude-code/troubleshooting/github-actions-cloud-provider-troubleshooting What should I check if Claude Code GitHub Actions fails to authenticate with my cloud provider? https://latestn.com/tool/claude-code/troubleshooting/gitlab-claude-not-responding How do I troubleshoot Claude Code not responding to @claude commands in GitLab? https://latestn.com/tool/claude-code/troubleshooting/handle-cut-off-stream How do I handle a stream that gets cut off in the Claude Code Agent SDK? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:02:45Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/troubleshooting/hook-not-firing/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/claude-code/troubleshooting/hook-not-firing POST: https://latestn.com/dispute/tool/claude-code/troubleshooting/hook-not-firing with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/troubleshooting/hook-not-firing?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I fix a hook that is not firing in Claude Code? Revision 1, last verified 2026-11-20T12:16:39Z. https://latestn.com/tool/claude-code/troubleshooting/hook-not-firing (accessed 2026-11-21T09:58:03Z). @misc{LatestN_tool_claude_code_troubleshooting_hook_not_firing_r1, title = {How do I fix a hook that is not firing in Claude Code?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/troubleshooting/hook-not-firing}}, note = {Revision 1; digest sha256:b4ad0758d6864880; last verified 2026-11-20T12:16:39Z; accessed 2026-11-21T09:58:03Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/claude-code/troubleshooting/hook-not-firing