Claude Code Hooks Guide 2026
Claude Code hooks are shell commands the CLI runs at specific lifecycle events. They turn the editor into a programmable system. Available Hooks - PreToolUse: before a tool runs block or modify - PostToolUse: after a tool runs validate, format - UserPromptSubmit: when the user hits Enter on a prompt - SessionStart: new session begins - SessionEnd: session ends - Notification: any notification fir…