Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · claude-code

Hooks reference changedhooks

Nearest release: v2.1.239, published 2 hours before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Recorded here
Lines+8added
Lines−8removed
From line 2,597 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits112to this page, all time

The whole hunk

from line 2597, old and new numbered
/
lines

This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.

from line 2597
25972597 
25982598Runs when a configuration file changes during a session. Use this to audit settings changes, enforce security policies, or block unauthorized modifications to configuration files.
25992599 
2600ConfigChange hooks fire for changes to settings files, managed policy settings, and skill files.
2600Claude Code runs ConfigChange hooks when a settings file, a managed policy file, or a skill file changes. For managed policy, it runs them only when `managed-settings.json` or a file in `managed-settings.d/` changes. It applies [server-managed settings](/docs/en/server-managed-settings) and changes to macOS managed preferences or Windows registry policy without running them. On WSL with [`wslInheritsWindowsSettings`](/docs/en/settings#available-settings), it also applies a changed Windows-side managed settings file on its policy poll without running them.
26012601 
26022602The matcher filters on the configuration source:
26032603 
2604| Matcher | When it fires |
2605| :----------------- | :---------------------------------------- |
2606| `user_settings` | `~/.claude/settings.json` changes |
2607| `project_settings` | `.claude/settings.json` changes |
2608| `local_settings` | `.claude/settings.local.json` changes |
2609| `policy_settings` | Managed policy settings change |
2610| `skills` | A skill file in `.claude/skills/` changes |
2604| Matcher | When it fires |
2605| :----------------- | :----------------------------------------------------------------- |
2606| `user_settings` | `~/.claude/settings.json` changes |
2607| `project_settings` | `.claude/settings.json` changes |
2608| `local_settings` | `.claude/settings.local.json` changes |
2609| `policy_settings` | `managed-settings.json` or a file in `managed-settings.d/` changes |
2610| `skills` | A skill file in `.claude/skills/` changes |
26112611 
26122612This example logs all configuration changes for security auditing:
26132613 
from line 3151
31513151 
31523152In addition to command, HTTP, and MCP tool hooks, Claude Code supports prompt-based hooks (`type: "prompt"`) that use an LLM to evaluate whether to allow or block an action, and agent hooks (`type: "agent"`) that spawn an agentic verifier with tool access. Not all events support every hook type.
31533153 
3154Events that support all five hook types (`command`, `http`, `mcp_tool`, `prompt`, and `agent`):
3155 
3156* `PermissionDenied`
3157* `PermissionRequest`
3158* `PostToolBatch`
3159* `PostToolUse`
3160* `PostToolUseFailure`
3161* `PreToolUse`
3162* `Stop`
3163* `SubagentStop`
3164* `TaskCompleted`
3165* `TaskCreated`
3166* `TeammateIdle`
3167* `UserPromptExpansion`
3168* `UserPromptSubmit`
3169 
3170Events that support `command`, `http`, and `mcp_tool` hooks but not `prompt` or `agent`:
3171 
3172* `ConfigChange`
3173* `CwdChanged`
3174* `DirectoryAdded`
3175* `Elicitation`
3176* `ElicitationResult`
3177* `FileChanged`
3178* `InstructionsLoaded`
3179* `MessageDisplay`
3180* `Notification`
3181* `PostCompact`
3182* `PreCompact`
3183* `SessionEnd`
3184* `StopFailure
3154Events th
Feedback