InstantPing

InstantPing / Guides

Claude Code notification hooks: Stop and Notification explained

Updated 2026-12-04

Claude Code hooks are commands that Claude Code runs at fixed points in a session. Two of them are made for notifications: Stop and Notification. This page explains what each does and where hooks go wrong.

The events

EventFires whenUse it to
StopClaude finishes respondingTell you a task is done
NotificationClaude needs permission to use a tool, or has been idle waiting for your inputTell you Claude is waiting
UserPromptSubmitYou send a promptRecord the start time, so you can skip short tasks

Configuration

Hooks are configured in settings.json: ~/.claude/settings.json for all projects, .claude/settings.json for one project. Each event holds a list of hook groups, each with one or more commands:

{
  "hooks": {
    "Stop": [
      { "hooks": [ { "type": "command", "command": "node ~/notify.mjs" } ] }
    ]
  }
}

What your command receives

Claude Code writes a JSON object to the command's standard input. It includes the event name (hook_event_name), the session_id and the working directory (cwd). For Notification there is also a message that says why Claude is notifying you. Read it with jq, Node or Python.

Pitfalls

A ready-made version

InstantPing is a hook script plus a phone app. npx instantping setup installs Stop, Notification and UserPromptSubmit hooks, detaches the slow work, skips short tasks, and pushes to your phone. Remove it again with npx instantping uninstall.

Frequently asked questions

What is the difference between the Stop and Notification hooks?

Stop fires when Claude finishes a response. Notification fires when Claude needs permission to use a tool or has been idle waiting for your input.

Where do I configure Claude Code hooks?

In settings.json: ~/.claude/settings.json for all projects, or .claude/settings.json inside a project.

Why does my notification hook slow Claude Code down?

Claude Code waits for a hook command to finish. Start slow work, such as showing a popup, as a detached background process and return immediately.