Articles tagged “hooks”
-
Claude Code Hooks: Bash Matchers and the Monitor Tool
Since Claude Code 2.1.314 a Bash-matcher hook also sees Monitor commands, but allow and updatedInput are ignored there. What it means for your policy hooks.
-
Claude Code Hooks onFailure: Make a Broken Hook Block
A Claude Code policy hook that crashes, times out or prints bad JSON lets the action through. How onFailure block makes it fail closed, and what it skips.
-
Claude Code PreModelSwitch Hook: Block or Confirm /model
How Claude Code's PreModelSwitch and PostModelSwitch hooks work: the input fields, allow/ask/deny decisions, matcher rules, and three tested example scripts.
-
Claude Code Hooks: A Practical Guide
A practical guide to Claude Code hooks. The events worth knowing, exit code semantics, matcher syntax, and working examples you can copy into settings.json.