Skip to content
← All articles
Guides

Get Claude Code notifications the moment it's done or stuck

The built-in alert, a Stop hook for instant done alerts, why Claude Code notifications come a minute late, phone push, and alerts for several sessions.

SupaYatta12 min read

To get a notification when Claude Code finishes or needs input, add two hooks to ~/.claude/settings.json, a Stop hook for finished turns and a Notification hook for permission prompts. Ghostty, Kitty and iTerm2 already get a built-in desktop alert, but Claude Code holds it until it thinks you've walked away. That wait is why an alert can seem to never come.

TL;DR

  • For an alert the moment Claude Code finishes, add a Stop hook. The built-in "done" alert waits about 60 seconds and fires only if you haven't typed since.
  • For permission prompts, add a Notification hook with the permission_prompt matcher. It fires once you haven't typed for about 6 seconds, per Anthropic's hooks reference.
  • By default only Ghostty, Kitty and iTerm2 get desktop notifications (terminal setup docs).
  • An osascript hook fails silently until you allow notifications for Script Editor in System Settings (hooks guide).
  • Clicking an osascript banner opens Script Editor, not the session that's waiting (Apple's notifications guide, hooks guide). With several sessions open, SupaYatta names the session in your notch and opens it in one click.

Quick navigation

How do the Claude Code notification options compare?

The Stop hook is the fastest route to a "done" alert, and the built-in alert is the one with no setup. This table follows Anthropic's hooks reference, terminal setup docs and Remote Control docs for Claude Code 2.1.330, released on November 20, 2026.

Route "Done" alert "Needs you" alert Setup Best for
Built-in alert (auto) About 60 s after the turn, if you haven't typed About 6 s after your last keystroke None in Ghostty and Kitty, two switches in iTerm2 One session in a supported terminal
Terminal bell (terminal_bell) Same timing, as a bell Same timing, as a bell One line in settings Apple's Terminal, Warp, VS Code's terminal
Notification hook About 60 s after (idle_prompt) About 6 s after (permission_prompt) About 15 lines of JSON A banner or sound in any terminal
Stop hook The moment the turn ends Not covered A settings entry and a short script Knowing the second Claude finishes
Phone push When a long task finishes Permission prompts and questions Claude app, Remote Control, two switches Stepping away from the desk
SupaYatta When the turn ends, with a reply preview Approvals, questions and errors, with a chime One Connect click Several sessions or agents at once

Does Claude Code send notifications on its own?

Yes, in three terminals. With the default setting, auto, Claude Code sends a desktop notification when it detects Ghostty, Kitty or iTerm2, according to its terminal setup docs.

Everywhere else it stays quiet. Apple's Terminal gets at most a silent bell, shown as a window flash or a Dock bounce, and other terminals get nothing (terminal setup docs).

iTerm2 needs one more step. Open Settings > Profiles > Terminal, check Notification Center Alerts, then click Filter Alerts and turn on Send escape sequence-generated alerts.

To hear something in any terminal, switch the channel to the bell. Run /config and change Local notifications, or add this line to ~/.claude/settings.json.

{
  "preferredNotifChannel": "terminal_bell"
}

In Apple's Terminal, also turn on Audible bell under Settings > Profiles > Advanced, or the bell stays silent. The settings reference lists the other values, from iterm2_with_bell to notifications_disabled.

Inside tmux, add set -g allow-passthrough on to ~/.tmux.conf (tmux 3.3 or later), or the alert never reaches your terminal app (hooks reference).

SupaYatta's alerts don't depend on which terminal you use. They come from Claude Code's hooks and show in the notch, so a session in Warp or VS Code's terminal alerts you the same way (SupaYatta).

Why does the Claude Code notification come late?

Claude Code only alerts you when you seem to be away from the terminal, and it decides that with two timers. Both are spelled out in the hooks reference.

  • Finished turns (idle_prompt) fire about 60 seconds after Claude stops responding, only if you haven't typed since and no background agent is still running.
  • Permission prompts (permission_prompt) fire once you haven't typed for about 6 seconds. Every keystroke restarts that clock.
  • In Claude Desktop and the VS Code extension, the permission alert comes about 6 seconds after the request, typing or not. Before Claude Code v2.1.233 it didn't fire there at all (hooks reference).

The delay is deliberate. An alert for a turn you just watched end would only be noise.

It hurts when you switch to email the second you press Enter. Claude finishes in 40 seconds, the alert waits another 60, and the session sits idle for a minute you didn't need to lose. A Stop hook removes that minute, and SupaYatta reads the same lifecycle hooks for its "Turn finished" alerts.

How do you get a notification the moment Claude Code finishes?

Add a Stop hook that runs a short script. Claude Code hands the hook a JSON object with the project folder (cwd) and Claude's final reply (last_assistant_message), so the banner can say which project finished and what Claude said (hooks reference).

  1. Save this script as ~/.claude/hooks/notify-done.sh. It uses jq, which you can install with brew install jq.
#!/bin/bash
# Stop hook: show which project finished and how Claude's reply starts.
input=$(cat)
project=$(basename "$(jq -r '.cwd' <<<"$input")")
reply=$(jq -r '.last_assistant_message // "Claude stopped"' <<<"$input" | tr '\n' ' ' | cut -c1-140)
osascript -e 'on run argv' \
  -e 'display notification (item 2 of argv) with title (item 1 of argv) sound name "Glass"' \
  -e 'end run' "Claude Code: $project" "$reply"
  1. Make it executable with chmod +x ~/.claude/hooks/notify-done.sh.
  2. Add the hook to ~/.claude/settings.json. If the file already has a hooks key, put Stop next to the events already in it.
{
  "hooks": {
    "Stop": [
      {
        "hooks": [
          { "type": "command", "command": "$HOME/.claude/hooks/notify-done.sh" }
        ]
      }
    ]
  }
}
  1. Type /hooks in Claude Code and check the hook appears under Stop. Edits are normally picked up on their own, so restart the session only if it's missing (hooks guide).
  2. Ask Claude something small, switch to another app and wait for the banner.

The script hands the text to AppleScript as arguments, which keeps quotes in Claude's reply from breaking the command.

If nothing appears, Script Editor is missing notification permission. osascript notifications come from Script Editor, and without permission the command fails silently and macOS never asks (hooks guide). Run osascript -e 'display notification "test"' once, then turn on Allow Notifications for Script Editor in System Settings > Notifications.

Stop has two gaps. It doesn't fire when you interrupt Claude, and a turn that ends on an API error fires StopFailure instead, so add the same script there to hear about rate limits too (hooks reference).

SupaYatta's Connect button writes its own hooks into this same file, after saving an exact backup, and Disconnect removes only what it added (how SupaYatta connects).

How do you get alerted when Claude Code needs permission?

Add a Notification hook with the permission_prompt matcher. It fires when a permission prompt has waited about 6 seconds without a keystroke, as the hooks guide describes.

{
  "hooks": {
    "Notification": [
      {
        "matcher": "permission_prompt",
        "hooks": [
          {
            "type": "command",
            "command": "osascript -e 'display notification \"Claude Code is waiting for your approval\" with title \"Claude Code\" sound name \"Funk\"'"
          }
        ]
      }
    ]
  }
}

Leave the matcher empty to fire on every notification type, including idle_prompt for finished turns.

For a signal the instant the prompt appears, the docs point to the PermissionRequest event instead (hooks reference). That event can also approve or deny the request, so keep a notify-only script silent and answer the prompt yourself.

Hooks run alongside the built-in alert rather than replacing it, so Ghostty, Kitty and iTerm2 may show two banners (terminal setup docs). Set preferredNotifChannel to notifications_disabled to keep only yours, since your hooks still run with that setting (hooks reference). SupaYatta flags a waiting approval on its own, turning its count yellow with a chime until you look.

Can you get Claude Code notifications on your phone?

Yes, through Remote Control. While Remote Control is connected, Claude can push to the Claude app on iOS or Android when a long task finishes or when it needs a decision (Remote Control docs).

  1. Install the Claude app and sign in with the account you use for Claude Code.
  2. Allow notifications when your phone asks.
  3. Run /config and turn on Push when Claude decides, Push when actions required, or both.

There's no per-event setting beyond those two switches, though you can ask in the prompt itself, as in "notify me when the tests finish." Claude Code skips the push while you're typing in or looking at the connected terminal (Remote Control docs).

Why do hook notifications fall short with several sessions?

A banner tells you something happened, not where to go. Clicking a Mac notification opens the app that sent it (Apple's notifications guide), and for osascript that's Script Editor, not your terminal (hooks guide).

With three terminals open, that means clicking through tabs to find the one that's waiting. Codex reads hooks from its own files, such as ~/.codex/hooks.json (Codex hooks docs), so a Codex run next to it needs a setup of its own. Cursor does load the hooks in ~/.claude/settings.json, on by default, and runs your Stop hook but not the Notification one (Cursor docs).

Vinson Koo, a Claude Code user, put it on X: "One of my biggest pain points with multiple Claude Code sessions is not knowing when Claude has finished responding or which session it was. With SupaYatta I don't have to worry about that anymore." If you run agents in separate worktrees, the parallel agents guide covers that setup.

How does SupaYatta show which session finished or needs you?

SupaYatta is a Mac app that shows every Claude Code session's state in the MacBook notch, or in a floating bar on any Mac, and alerts you the moment one finishes or needs you. It reads the same Claude Code hooks covered above, and one Connect click adds them for you.

A finished turn shows the first lines of Claude's reply and opens that exact session in one click. A blocked session turns the count yellow, plays a chime and makes the screen edge glow until you look (SupaYatta).

The click lands on the right tab in Terminal and iTerm, on the exact tab in Ghostty builds that support it, and in local VS Code through a small companion (SupaYatta changelog). The same notch tracks Claude Cowork, Codex CLI, the Codex desktop app, Cursor and OpenCode.

Say you have three sessions going.

Session Agent and app What SupaYatta shows
refactor-auth Claude Code in Ghostty Working, counted in the notch
migrate-db Codex CLI in iTerm Needs you, with a yellow count and a chime
write-tests Claude Code desktop app Turn finished, with the first lines of the reply

Clicking the migrate-db alert brings iTerm forward on that tab, and write-tests keeps a red dot until you mark it seen. All of this works in SupaYatta 0.2.1, released on November 18, 2026.

SupaYatta only tells you. It never answers, approves or resumes anything, and a green "done" means the turn ended, not that the work is right. It needs no account or API key, never uploads your prompts, code or replies, and runs on macOS 13 or later (SupaYatta).

What should you check when Claude Code notifications don't show?

Check, in order, whether your terminal gets alerts at all, iTerm2's alert filter, Script Editor's notification permission, tmux passthrough and the hook's JSON. Each row below is a cause the docs name.

Symptom Likely cause Fix Source
Nothing in Apple's Terminal, Warp or VS Code No desktop alert there by default Set terminal_bell or add a hook Terminal setup
iTerm2 stays quiet Escape-sequence alerts are off Turn on Notification Center Alerts and the filter Terminal setup
osascript shows nothing Script Editor has no permission Allow it in System Settings > Notifications Hooks guide
Nothing inside tmux Passthrough is off set -g allow-passthrough on (tmux 3.3+) Hooks reference
Hook missing from /hooks Invalid JSON or the wrong file Remove trailing commas, use ~/.claude/settings.json Hooks guide

Conclusion

The most dependable Claude Code notification setup is a Stop hook for finished turns plus a Notification hook with the permission_prompt matcher. Together they take about 30 lines and one short script, and they work in every terminal.

The built-in alert is a fine start in Ghostty, Kitty and iTerm2. Its 60-second wait for "done" suits someone who walked away, not someone who switched windows, and in Apple's Terminal, Warp and VS Code's terminal it stays silent unless you change the channel.

Phone push covers the time you're away from the Mac. Once you run three sessions or add Codex, the problem shifts from hearing an alert to finding the session behind it, which is the part SupaYatta handles.

Copy the Stop script above into ~/.claude/hooks/ and run one small prompt to see the banner. If you already keep three terminals busy, download SupaYatta and click Connect for Claude Code, so the next alert names its session.

Why SupaYatta

Claude Code, Cowork and Codex sessions, across every app and subscription, in your notch. The instant one finishes or gets stuck, you know, and the next task goes out.

SupaYatta runs on macOS 13 and newer, in the notch on MacBooks and as a floating bar on any Mac. The download is free and the seven-day trial needs no credit card (SupaYatta).

FAQ

Why is Claude Code not sending notifications?

Usually because your terminal doesn't get them by default. Claude Code sends desktop notifications only in Ghostty, Kitty and iTerm2, and iTerm2 needs its alert settings turned on (terminal setup docs). Elsewhere, set preferredNotifChannel to terminal_bell or add a Stop hook.

How do I make Claude Code play a sound when it's done?

Add a Stop hook whose command is afplay /System/Library/Sounds/Glass.aiff, which plays a macOS sound the moment the turn ends. The terminal setup docs use the same command in a Notification hook, which plays about 60 seconds later.

Do Claude Code notifications work in VS Code and the Claude desktop app?

Yes, hooks fire there too. In Claude Desktop and the VS Code extension, the permission alert comes about 6 seconds after Claude asks, even while you type, on Claude Code v2.1.233 or later (hooks reference). VS Code's integrated terminal gets no built-in alert, so use a hook there (terminal setup docs). SupaYatta tracks Claude Code in the desktop app too, through the same hooks.

Can I get Claude Code notifications on my phone?

Yes, through Remote Control with the Claude app signed in to the same account. Run /config and turn on Push when Claude decides, Push when actions required, or both (Remote Control docs).

How do I turn off Claude Code notifications?

Set preferredNotifChannel to "notifications_disabled" in ~/.claude/settings.json, or pick it under Local notifications in /config (settings reference). Notification hooks still run with that setting, so remove them too if you want full silence (hooks reference).

Does a "done" notification mean the task worked?

No. The Stop event fires when Claude finishes responding, whatever the result (hooks reference), and a turn can end on a question or a half-finished change. Read the reply before sending the next task, which is why SupaYatta's finished alert shows its first lines.