settings.json → hooks

Claude Code hooks, readable and switchable

Hooks run your own commands when Claude Code does something — starts a session, uses a tool, finishes a turn. They live inside settings files at three levels. The Hooks tab shows them all, with the full command, and lets you turn one off without deleting it.

Hooks tab listing hooks by event and scope with their commands

"hooks": { … }

Where Claude Code hooks live

  1. ~/.claude/settings.jsonUserYour hooks, for every project.
  2. .claude/settings.jsonProjectShared with the repository.
  3. .claude/settings.local.jsonLocalThe project, but only on your machine.

What the Hooks tab does

  1. full commandRead every hookGrouped by event, with its matcher, scope and the exact command it runs.
  2. _disabled_hooksTurn one off, keep itA disabled hook is moved aside in the same file, so turning it back on restores it exactly.
  3. scope → event → matcher → commandAdd one with a guided formPick where it goes, which event, which tools it matches, and the command — no JSON.
  4. edit · deleteChange or removeEdit any field or remove a hook; open /hooks in Claude Code to check the result.

Claude Code hook events (33)

The events the Hooks tab's form offers, from the extension's source. Anthropic's hooks reference has each event's input and how its output is used.

Hook events the Hooks tab's editor offers (33)
EventWhen it fires
SessionStartWhen a session starts
SessionEndWhen a session ends
UserPromptSubmitBefore a submitted prompt is processed
PreToolUseBefore any tool runs
PostToolUseAfter a tool finishes
PostToolUseFailureAfter a tool call fails
PostToolBatchOnce after every tool call in a batch has resolved
UserPromptExpansionWhen a slash command or other prompt expansion resolves
NotificationOn a Claude Notification event
StopWhen the user stops the run
StopFailureWhen a run stops on an error
SubagentStartWhen a subagent starts
SubagentStopWhen a subagent finishes
PreCompactBefore context auto-compaction
PostCompactAfter context auto-compaction
PermissionRequestWhen a tool permission is requested
PermissionDeniedWhen a tool permission is denied
PreModelSwitchBefore the session switches model
PostModelSwitchAfter the session switches model
SetupOn init and maintenance setup runs
TeammateIdleWhen a teammate session goes idle
TaskCreatedWhen a task is created
TaskCompletedWhen a task completes
ElicitationWhen an MCP server requests user input
ElicitationResultAfter the user answers an MCP elicitation
ConfigChangeWhen a settings or config file changes
WorktreeCreateWhen a session worktree is created
WorktreeRemoveWhen a session worktree is removed
InstructionsLoadedWhen a CLAUDE.md / instructions file is loaded
CwdChangedWhen the working directory changes
FileChangedWhen a watched file changes
DirectoryAddedWhen a directory is added to the session
MessageDisplayAs assistant output streams — display only

FAQ

Questions, answered

Where are Claude Code hooks configured?

Under hooks in a settings file: ~/.claude/settings.json (all projects), .claude/settings.json (the project, shared) or .claude/settings.local.json (the project, just you).

How do I turn off a hook without deleting it?

Flip its switch in the Hooks tab. The hook moves to a _disabled_hooks entry in the same file, so turning it back on restores it exactly.

Which hook events are there?

The table on this page lists all 33 events the editor offers, from SessionStart to SessionEnd, with when each one fires.

Free, open source, and it stays on your machine.

Apache-2.0. No telemetry, no account, no network client. Works with the Claude Code CLI and the official extension.

code --install-extension vishalguptax.claude-manager