Use Claude Code hooks for status notifications
Choose events for working, permission requests and completion without granting permissions automatically.
Published · 2 sources · Resume reading
Claude Code hooks can signal when a session needs your attention, per the hook reference. A status widget or notification can react to those events without approving a tool call. [1]
Choose events for each state
The reference describes these lifecycle events. [1]
UserPromptSubmitfires when you submit a prompt.PostToolUsefires after a tool succeeds.PermissionRequestfires when Claude is about to request permission.Stopfires when Claude finishes responding; an interrupted response does not trigger it.
Use the first two for a working indicator, PermissionRequest for an attention indicator and Stop for completion. Keep the display separate from permission-decision output. [1]
Add a notification hook
Follow the hook guide's desktop-notification example in your Claude settings. Choose a command for your operating system. The guide includes macOS and Linux options. [2]
Warning: hooks run shell commands. Read a hook before installing it, especially if it comes from another repository. [2]
Check the configured hooks
Inside Claude Code, inspect the configured hooks with the guide's command. [2]
/hooksYou should see your event and command listed. Trigger a notification with a harmless task before connecting the same signal to a light or desktop widget. [2]
The permission_prompt notification waits before firing. Use PermissionRequest when you need the signal at the permission request itself; the reference notes separate behavior for sandbox network prompts. [1]
Keep this guide
Filed under Claude Code
Sources
- Claude Code hook referencecode.claude.com
- Claude Code hook setup guidecode.claude.com