skip to content

How do you see which Claude Code hooks are active, and switch them all off temporarily without deleting them?

level: middleimportance: nice to knowfreq 8%

answer

  1. a read-only browser grouped by event
  2. each row labelled with its source
  3. one switch for every hook
  4. settings precedence decides the value
  5. managed hooks answer only to managed

basics

~10 s

/hooks lists configured hooks by event with each one's source, read-only. "disableAllHooks": true switches hooks off, plus any custom status line; settings precedence decides the value, and only managed settings can disable managed hooks.

solid answer

~40 s

`/hooks` opens a read-only browser of configured hooks grouped by event; each entry is labelled with its source (user, project or local settings, a plugin, the session), and selecting one shows exactly what it runs and where it is defined. `All events` at the end lists events with nothing configured. To change a hook you edit its file; the file watcher normally picks the edit up. To turn everything off without deleting it, set `"disableAllHooks": true`. Claude Code reads the value left after settings precedence, so a project's `false` beats a user's `true`; for one run, `claude --settings '{"disableAllHooks": true}'` outranks project and local settings. It also disables a custom status line and file-suggestion command. There is no per-hook switch, and only `disableAllHooks` set in managed settings can disable hooks an administrator deployed there.

go deeper

for a junior

Recall that /hooks lists the configured hooks and that disableAllHooks set to true turns them all off without deleting them.

for a middle

Explain that /hooks is read-only and labels each hook's source, and that disableAllHooks follows settings precedence, so a project or local value can override yours.

for a senior

Use /hooks to debug merged configurations from several sources, know --settings for a one-run override, and remember managed hooks survive a non-managed disableAllHooks.

for a principal

Decide who may turn enforcement off: a team-wide project hook can be disabled locally, so anything that must always run belongs at the managed level or in CI.

## The /hooks menu Hooks can come from many places: `~/.claude/settings.json`, the project's `.claude/settings.json`, `.claude/settings.local.json`, managed policy settings, an enabled plugin's `hooks/hooks.json`, and the frontmatter of an invoked skill or a running subagent. Entries **merge** across these sources rather than replacing each other, so the only reliable way to know what will run is to ask Claude Code. Typing **`/hooks`** opens a **read-only browser**: - Hooks are listed by event, each labelled with where it comes from, such as user settings, project settings, local settings, a plugin, or the current session. - Selecting a hook shows the full text of what it runs and where it is defined: a settings file's path or a plugin's name. - `All events`, at the end of the list, browses every event, including those with no hooks. - The same handler defined in more than one settings file runs once; a plugin's or skill's copy stays separate. To add or change a hook you edit the settings file (or ask Claude to). Direct edits are normally picked up by the file watcher; if `/hooks` still shows nothing after a few seconds, restart the session, and check the JSON is valid, since comments and trailing commas are not allowed. ## Turning hooks off: disableAllHooks **`disableAllHooks`** is a Boolean setting that turns off **hooks, any custom status line, and any custom file-suggestion command** at once, without deleting their configuration. It is meant for temporary use: debugging a slow session, isolating which hook breaks something, or running in a folder whose hooks you have not reviewed. ## How precedence decides Claude Code reads the value left after normal settings precedence, so the most specific non-managed layer that sets the key wins. | Where it is set | Effect | |---|---| | `~/.claude/settings.json` | off for you, unless a project or local file sets `false` | | `.claude/settings.json` (project) | applies to everyone in the repo; overrides a user value | | `.claude/settings.local.json` | your uncommitted override for this project | | `claude --settings '{"disableAllHooks": true}'` | one run; outranks project and local settings | | managed settings | the only level that can also disable managed hooks | ## What it cannot do - **No per-hook switch.** You cannot disable one hook while keeping it in the configuration; remove its entry, or narrow its matcher or `if` filter. - **Managed hooks persist.** A user, project or local `disableAllHooks` does not touch hooks an administrator deployed through managed settings. Restricting *which* hooks may run organisation-wide is a separate managed control. - **Collateral effects.** The status line and file-suggestion command go dark too, and features built on hooks stop working; `/goal`, for example, reports that it cannot run while hooks are disabled. ## Where the switch earns its keep - **Bisecting a problem.** When a session feels slow or a tool call is mysteriously blocked, turning all hooks off for one run shows whether a hook is responsible; `/hooks` then narrows it to one entry. - **A one-off run you want unhooked.** The `--settings` form turns off the project's hooks for a single run, for example before reviewing a repository's `.claude/` folder, without editing any committed file. - **Not a team policy.** Because any developer's local file can flip it, `disableAllHooks` is a personal debugging switch, never a way to enforce anything. ## Troubleshooting with /hooks 1. A hook never fires: open `/hooks` and confirm it sits under the expected event, from the expected source. 2. It is listed but still silent: check the matcher's exact case and the event's timing, then run with `claude --debug` to see matches, exit codes and stderr. 3. Nothing is listed despite a valid file: confirm the file location, and read any notice at the top of the menu; one notice says only hooks from managed settings run here, which means the organisation has restricted hooks to that source.

  • You set disableAllHooks to true in ~/.claude/settings.json, yet a project's hooks still run. Why?
    Claude Code uses the value left after settings precedence, and the project's `.claude/settings.json` sets `disableAllHooks: false`, which outranks user settings. Set `true` in `.claude/settings.local.json`, which outranks the project file, or pass `--settings '{"disableAllHooks": true}'` for one run. Hooks from managed settings keep running either way.
  • How do you silence one noisy project hook without losing the others?
    There is no per-hook disable. Edit the hook's entry: remove it, or narrow its matcher or `if` filter so it fires less. Because hook entries merge across levels, a local settings file cannot remove a project hook; it can only add hooks or flip `disableAllHooks` for everything.

  • /hooks is an interactive editor for adding and changing hooks.
  • disableAllHooks in my user settings always wins over the project's value.
  • You can switch off one hook and keep the rest of the configuration active.
  • A user's disableAllHooks also stops hooks an administrator deployed via managed settings.
  • disableAllHooks affects hooks only; a custom status line keeps running.