Hooks are commands you set up to run automatically at set moments, such as before Claude uses a tool. A matcher is the pattern that decides which tools a hook applies to. /hooks is the command that shows your hooks.
The /hooks menu no longer has separate screens for picking a matcher and then picking a hook. Choosing an event now opens a single screen that handles its matchers. When you view a hook and cancel, you go back to the list.
Browsing hooks takes fewer steps, and the order of screens is different from before.
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
[Claude Code hooks](https://code.claude.com/docs/en/hooks-guide.md) let you register custom shell commands that evaluate permissions at runtime. PreToolUse hooks run before the permission prompt. The hook output can deny the tool call, for…permissions see the edit
If Claude reports a refused tool call, ask it for the error text. These errors mean that your [`PreToolUse` hook](https://code.claude.com/docs/en/hooks#pretooluse) didn't give a decision:code-mode see the edit
Anthropic's documentation has since written up /hooks, on Run tool calls from code with Code Mode.
Fixed /hooks losing your place when going back