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": { … }
Where Claude Code hooks live
- ~/.claude/settings.jsonUserYour hooks, for every project.
- .claude/settings.jsonProjectShared with the repository.
- .claude/settings.local.jsonLocalThe project, but only on your machine.
What the Hooks tab does
- full commandRead every hookGrouped by event, with its matcher, scope and the exact command it runs.
- _disabled_hooksTurn one off, keep itA disabled hook is moved aside in the same file, so turning it back on restores it exactly.
- scope → event → matcher → commandAdd one with a guided formPick where it goes, which event, which tools it matches, and the command — no JSON.
- edit · deleteChange or removeEdit any field or remove a hook; open
/hooksin 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.
| Event | When it fires |
|---|---|
SessionStart | When a session starts |
SessionEnd | When a session ends |
UserPromptSubmit | Before a submitted prompt is processed |
PreToolUse | Before any tool runs |
PostToolUse | After a tool finishes |
PostToolUseFailure | After a tool call fails |
PostToolBatch | Once after every tool call in a batch has resolved |
UserPromptExpansion | When a slash command or other prompt expansion resolves |
Notification | On a Claude Notification event |
Stop | When the user stops the run |
StopFailure | When a run stops on an error |
SubagentStart | When a subagent starts |
SubagentStop | When a subagent finishes |
PreCompact | Before context auto-compaction |
PostCompact | After context auto-compaction |
PermissionRequest | When a tool permission is requested |
PermissionDenied | When a tool permission is denied |
PreModelSwitch | Before the session switches model |
PostModelSwitch | After the session switches model |
Setup | On init and maintenance setup runs |
TeammateIdle | When a teammate session goes idle |
TaskCreated | When a task is created |
TaskCompleted | When a task completes |
Elicitation | When an MCP server requests user input |
ElicitationResult | After the user answers an MCP elicitation |
ConfigChange | When a settings or config file changes |
WorktreeCreate | When a session worktree is created |
WorktreeRemove | When a session worktree is removed |
InstructionsLoaded | When a CLAUDE.md / instructions file is loaded |
CwdChanged | When the working directory changes |
FileChanged | When a watched file changes |
DirectoryAdded | When a directory is added to the session |
MessageDisplay | As 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