Skip to content
BENIBIX Learn

Notification Hook

AI⌨️ Claude CodeConfiguration

Also known as Notification, permission_prompt, idle_prompt

The event when Claude Code needs you, used for desktop or phone pings.

Think of it like

It is like a phone that buzzes you when the oven is done.

Example

Emma leaves Claude working and makes tea. Her Notification hook pings her laptop when Claude needs a yes.

Why it matters

Claude can sit waiting for an hour while you are away. A ping ends that wait.

Definition

Notification is the hook event that fires when Claude Code sends a notice. Common kinds are permission_prompt, when Claude needs your yes, and idle_prompt, when it is waiting for you. The matcher picks the kind. It is the usual way to get a desktop or phone ping. Its exit code and output are ignored.

Example code

json
{
  "hooks": {
    "Notification": [
      { "matcher": "permission_prompt|idle_prompt", "hooks": [{ "type": "command", "command": "notify-send 'Claude needs you'" }] }
    ]
  }
}
A desktop ping when Claude waits on you.

Common mistake

Expecting an instant ping on each prompt. Some kinds only fire after you seem away for a few seconds.

Key takeaways

  1. 1
    When it needs you. Prompts, idle.
  2. 2
    Match the kind. permission_prompt.
  3. 3
    Output ignored. Pings only.