Claude Code hooks not running: what to check
Added a hook and nothing happens? A disableAllHooks somewhere, or a managed policy, may be switching it off. Here's the order to find where.
1. Check that it's loaded with /hooks
Type /hooks in Claude Code for a read-only browser of your configured hooks; each one is labeled with where it comes from (user, project or local settings, a plugin, or the current session). Select a hook to see exactly what it runs and where it's defined. If yours isn't listed, it's in a different file or it's being blocked.
2. disableAllHooks is the value left after precedence
"disableAllHooks": true turns off every hook without removing it. Claude Code reads the value left after settings precedence, so a false in a project's .claude/settings.json beats a true in your user settings. The reverse also holds: a true in the project or in .claude/settings.local.json stops your user hooks in that project. There's no switch for a single hook.
Where to look: ~/.claude/settings.json (all projects), .claude/settings.json (the project, committed), .claude/settings.local.json (the project, this machine only) and managed settings. To turn hooks off for one run, --settings '{"disableAllHooks": true}' takes precedence over project and local settings.
3. Managed settings
If managed settings include allowManagedHooksOnly, your user, project, local and plugin hooks are blocked (hooks from plugins force-enabled in managed enabledPlugins are exempt). If strictPluginOnlyCustomization locks hooks, only plugin and managed hooks run, not the ones in your own settings files. And hooks an administrator set up can't be turned off by disableAllHooks in user, project or local settings.
Check: if the Setting sources line in /status includes Enterprise managed settings, ask your administrator about these settings.
4. Still nothing?
Start a new session from your shell with claude --debug (or type /debug first in a new session if you don't use a shell) and look for your hook in the log. For most events, hook stdout goes to the debug log rather than the transcript, and a non-zero exit shows only the first line of stderr. A … hook error notice in the transcript usually means a non-blocking failure such as a wrong script path. Stray text from a shell profile can stop Claude Code from parsing a hook's JSON output.
With Lidnight
Lidnight shows in orange where Claude Code hooks are turned off (managed, local, project or user settings, including a managed-hooks-only policy) along with the cause, and Dashboard › AI setup shows whether plugins and MCP servers are actually on, blocked or turned off for this project. It only reads; it never changes disableAllHooks. When it connects its own hooks it backs up your settings first and adds only Lidnight's entries, and turning it off removes just those.
Checked 2026-11-07 against Claude Code's ‘Hooks reference’ (code.claude.com/docs/en/hooks). Things change; check the docs.
Try Lidnight free
Apple Silicon Macs · macOS 13 or later. Every download includes a free trial of everything in Pro (5 lid-closed runs or 14 days), no payment details needed. Pro is a one-time payment (1 Mac $9.99 · 3 Macs $14.99) with a 14-day refund.