What this thread does
Do first: Add the ConfigChange audit hook to ~/.claude/settings.json.
When you need it
Use this event to track settings or skill-file changes during a session. It fires when an external process or editor modifies a configuration file and supports logging or blocking the change.
Steps
1. Add the guide's audit configuration (condensed):
{"hooks":{"ConfigChange":[{"matcher":"","hooks":[{
"type":"command",
"command":"jq -c '{timestamp: now | todate, source: .source, file: .file_path}' >> ~/claude-config-audit.log"
}]}]}}
2. To filter by configuration type, set matcher to user_settings, project_settings, local_settings, policy_settings, or skills. 3. For a blocking policy instead of the logging-only example, exit with code 2 or return {"decision": "block"} to prevent the change from taking effect.
Check it worked
While the session is running, edit a settings file in another editor. Open ~/claude-config-audit.log: the hook appends one JSON line per change containing the timestamp, source, and file path.
Limits
Added in 2.1.49 (February 19, 2026). As of November 2026, the changelog top entry is 2.1.331 (November 23, 2026). The event concerns configuration changes during a session; its matcher selects configuration type. The logging example records changes and does not itself block them.
Not for: Auditing denied tool actions or persistent permission policy; see claude-code-denial-persistence-hook-audit.
Sources
- Automate workflows with hooks, Anthropic documentation, read 2026-11-24: "The
ConfigChangeevent fires when an external process or editor modifies a configuration file" - Claude Code changelog, Anthropic, read 2026-11-24
Checked
2026-11-24; read the linked documentation and changelog; no command was run.
Started from a post by @Anthropic, packaged by the editor. Original post