What this thread does
Run /hooks and confirm your hook is listed under the right event, check that the matcher equals the tool name exactly (matchers are case-sensitive), and read the tool call as JSON from stdin, not from $TOOL_NAME or $TOOL_ARGS (checked 2026-10-30; untested here).
Do first: the official "Hook not firing" checklist
From Anthropic's hooks guide and hooks reference:
1. Run /hooks: a read-only browser of configured hooks, with each hook's source (user, project, local, plugin, session). If the hook is missing, the file was not read or the JSON is wrong. 2. Matcher: a value of only letters, digits, _, -, spaces, , and | is an exact-string match; anything else is an unanchored JavaScript regex. Bash matches, bash does not. 3. Event: PreToolUse fires before a tool runs, PostToolUse after. PermissionRequest fires only when Claude Code is about to ask you. 4. Input: the tool call arrives as JSON on stdin with fields such as tool_name and tool_input. Test by hand: echo '{"tool_name":"Bash","tool_input":{"command":"ls"}}' | ./my-hook.sh; echo $?. 5. Script runs: chmod +x, absolute paths or ${CLAUDE_PROJECT_DIR}, jq installed. Command-hook stderr shows in claude --debug, not in the transcript, on events like PreToolUse. 6. Edits: the docs say direct edits to hooks in settings files are normally picked up by the file watcher; if not, start a new session. (In 2025 a collaborator said edits needed acknowledging in /hooks or a new session; current docs describe /hooks as read-only.) 7. Add a trivial hook (append a line to a log file) to separate "never invoked" from "my script fails".
Anthropic's 2.1.317 notes fix settings edits made in the first second after launch not taking effect, and 2.1.314 makes Bash-matching hooks run on Monitor shell commands; neither entry identifies all older plugin/IDE non-firing reports as resolved (checked 2026-11-05).
Plugin hooks that never fire (only SessionStart works)
- Plugin hooks live in
hooks/hooks.json, and the event map must sit inside a top-level"hooks"key; the plugins reference says a hooks file without that wrapper fails to load. Plugin hooks merge with user and project hooks only while the plugin is enabled;/hooksshows them with a plugin source. - Public reports: issue 36397 (felipearomani, 2026-03-19, closed as duplicate) says
PreToolUsefrom a pluginhooks.jsondid not fire while the same config in~/.claude/settings.jsondid, andSessionStartfrom the plugin worked. It was closed as a duplicate of 34573 (crombieman, 2026-03-15, closed as not planned). A commenter there said command hooks insettings.jsonworked and suggested moving the hooks there as a workaround. Issue 29767 (DronPascal, 2026-03-01, closed as completed) reported pluginStophooks never executing whileSessionStartfrom the same file worked. Whether these still happen on your version is unverified; test with the trivial log-file hook.
VS Code extension
Issue 92074 (QuranMakkah, 2026-09-04, closed as not planned on 2026-11-10 after inactivity; checked 2026-11-14) reports PreToolUse and UserPromptSubmit hooks in ~/.claude/settings.json not firing in the VS Code extension 2.1.259 on Windows 10, while the same scripts worked when run directly. It cites the docs line that hook events fire the same in terminal and IDE sessions. Single report; not reproduced.
The long-running issue
Issue 6305 (fwends, 2025-08-22, macOS; open, checked 2026-11-17) reports PreToolUse and PostToolUse hooks in .claude/settings.local.json never running while Stop, SubagentStop and UserPromptSubmit worked. Collaborator dicksontsai answered the same day that his reproduction worked and settings changes are snapshotted (acknowledge in /hooks or start a new session), and on 2025-09-11 that $TOOL_NAME and $TOOL_ARGS are wrong: use stdin JSON.
- Two commenters said they used
/hooksand restarted many times (one wrote "over 50") and hooks still never fired though scripts worked by hand; one spoke for seven developers. - Later 2026 comments (Windows 11, versions 2.1.215 and 2.1.220, including the VS Code extension) report the same, one saying hooks work in short sessions and silently stop in a long multi-edit session. These are single reports, not reproduced.
- Some later comments are long, promotional or propose theories (project versus user scope,
askignored in auto mode) that others dispute; treat them with care. - The changelog also lists a fix for hooks with comma-separated matchers that never fired, a separate cause not discussed in the thread.
No maintainer has said the "never invoked" reports in issue 6305 are fixed. If a trivial hook still never logs on a current version, add your version and operating system to the issue.
Limits
From the hooks docs and public issues; none of the reports was reproduced and no hook was run for this thread.
Not for: a safety hook that crashes yet lets the command run, or desktop alerts via hooks, see claude-code-hook-crashed-but-command-ran-onfailure-block; a rule you wrote in CLAUDE.md that Claude ignores, see claude-ignores-claude-md-use-hooks-and-deny-rules.
Started from a post by @fwends, packaged by the editor. Original post