InstantPing

InstantPing / Guides

Get a notification when Claude Code is done

Updated 2026-12-04

To get a notification when Claude Code finishes, add a Stop hook to your Claude Code settings. The hook runs a command each time Claude finishes responding. That command can show a popup, play a sound, or send a push to your phone.

Step 1: open your settings file

User-wide settings live in ~/.claude/settings.json (on Windows: %USERPROFILE%\.claude\settings.json). A project can also have its own .claude/settings.json. If the file already has a "hooks" key, add the "Stop" entry inside it instead of creating a second one.

Step 2: add the hook

macOS

{
  "hooks": {
    "Stop": [
      { "hooks": [ { "type": "command", "command": "osascript -e 'display notification \"Claude is done\" with title \"Claude Code\"'" } ] }
    ]
  }
}

Linux

{
  "hooks": {
    "Stop": [
      { "hooks": [ { "type": "command", "command": "notify-send 'Claude Code' 'Claude is done'" } ] }
    ]
  }
}

Windows (sound)

{
  "hooks": {
    "Stop": [
      { "hooks": [ { "type": "command", "command": "powershell -NoProfile -Command \"[console]::beep(880,300)\"" } ] }
    ]
  }
}

A visual Windows toast needs a longer PowerShell script that calls the Windows toast API; a beep is the shortest reliable option.

Step 3: test it

Start Claude Code, ask it anything short, and wait for the answer. The hook fires when Claude stops. If nothing happens, check that the JSON is valid and restart the session, because settings are read at start-up.

Also get told when Claude is waiting

Add the same block under "Notification". That event fires when Claude needs permission to use a tool or has been idle waiting for your input, which is the notification that saves you the most time. Details in Claude Code notification hooks explained.

Only notify for long tasks

This basic hook fires on every reply, including two-second ones. To skip short tasks you need a script that records when the prompt started (the UserPromptSubmit hook) and compares it on Stop. InstantPing does exactly this and ignores tasks under 15 seconds by default.

On your phone instead

Popups and sounds only reach you at your computer. For the walk-away case, see push notifications on your phone.

Frequently asked questions

Which hook fires when Claude Code is done?

The Stop hook. It runs each time Claude finishes responding.

Why does my Claude Code hook not run?

Check that the JSON in settings.json is valid, that the command works when you run it by hand in a terminal, and restart the session, because settings are read at start-up.

Can I skip notifications for short tasks?

Yes. Record the time on the UserPromptSubmit hook and compare it on Stop in a script. InstantPing does this and ignores tasks under 15 seconds by default.