Guide
How to get notified when Claude Code finishes or needs you
Claude Code can alert you when it finishes or stops for a permission prompt. Which method works depends on your terminal, and whether the session runs on your Mac or on another machine.
The short answer
- Ghostty, Kitty or iTerm2: Claude Code already sends a desktop notification when it finishes or needs permission while you're away from the terminal. iTerm2 needs one setting turned on (below).
- Any other terminal: set
"preferredNotifChannel": "terminal_bell"in~/.claude/settings.json, or add aNotificationhook that runs a command. - Several sessions, on your Mac or a dev box: use a tool that watches them all at once, such as Notchbird.
Try Notchbird free for 14 days, with every feature and no card.
1. Built-in desktop notifications
When Claude finishes a task or pauses for a permission prompt and you seem to be away from the terminal, Claude Code fires a notification. By default it shows a desktop notification only in Ghostty, Kitty and iTerm2.
In iTerm2, open Settings > Profiles > Terminal, check Notification Center Alerts, then click Filter Alerts and enable Send escape sequence-generated alerts. Also make sure your terminal app is allowed to send notifications in System Settings > Notifications.
The notification reaches your Mac over SSH too, so a remote session can still alert you. If you use tmux, add set -g allow-passthrough on to ~/.tmux.conf or tmux swallows it, then run tmux source-file ~/.tmux.conf to apply it to sessions already open.
2. The terminal bell
In Apple Terminal, Warp, the VS Code terminal and others, ask Claude Code to ring the bell instead, in ~/.claude/settings.json:
{
"preferredNotifChannel": "terminal_bell"
}
Apple Terminal can show a badge on its Dock icon when the bell rings. Check that Audible bell is on under Settings > Profiles > Advanced, because Claude Code's first-run terminal setup may have turned it off.
3. Hooks for a custom alert
Hooks run your own command on Claude Code events, in any terminal. Two events matter here:
| Event | Fires when |
|---|---|
Notification | Claude Code sends you a notification. Filter with a matcher such as permission_prompt, idle_prompt, agent_needs_input or agent_completed. |
Stop | Claude finishes responding, on every turn. It takes no matcher. |
This example shows a macOS notification when Claude needs permission, and plays a sound whenever it finishes a turn. Add it to ~/.claude/settings.json:
{
"hooks": {
"Notification": [
{
"matcher": "permission_prompt",
"hooks": [
{ "type": "command",
"command": "osascript -e 'display notification \"Claude Code needs your permission\" with title \"Claude Code\"'" }
]
}
],
"Stop": [
{
"hooks": [
{ "type": "command", "command": "afplay /System/Library/Sounds/Glass.aiff" }
]
}
]
}
}
A Notification hook receives JSON on standard input with session_id, cwd, notification_type and message, so a script can include the project name in the alert. Hooks run alongside the built-in notification and cannot block it.
Hooks have limits. They run on the machine where Claude Code runs, so a session on a remote box plays its sound on that box. A Stop hook also fires after every turn, which gets noisy in long sessions.
4. Notchbird: your sessions, in the notch
Notchbird is a Mac app that lives in your MacBook's notch. Sessions on this Mac appear as soon as you open it. To watch another Mac or a Linux machine as well, add an SSH alias you already use; watching it installs nothing there. Separate Claude Code and Codex count rings show sessions that need you or have unseen results. Needs-you uses contained red cues; ordinary working sessions keep a small activity mark and do not add to the counts. Answer Claude Code's permission prompts with Allow or Deny right in the notch, or click through to that exact session.
- Alerts need no hooks and nothing installed on remote machines. Approving from the notch is an opt-in hook, and Notchbird shows you the exact change first.
- One inbox for the sessions on your Mac and your dev box, instead of one alert per terminal.
- By default it asks macOS to leave it out of screen sharing. Some apps still capture it, so do a short test recording before a demo.
Sessions in the cloud
Claude Code on the web, the Code tab in the Claude app and claude --cloud run sessions on Anthropic's machines, not yours. Those sessions don't read your ~/.claude/settings.json, so your hooks don't run for them, no terminal is there to ring, and no Mac app can watch them, Notchbird included. To be alerted on your Mac, pull the session into your terminal with claude --teleport, run from a checkout of the same repository while signed in to the same claude.ai account. From then on it is a local session and alerts like any other.
If no alert appears
- Type
/hooksin Claude Code to see which hooks are loaded and which settings file each one comes from. - Check the settings file is valid JSON with
python3 -m json.tool ~/.claude/settings.json. A missing comma is the usual culprit. - Run the hook's command on its own in Terminal, for example
afplay /System/Library/Sounds/Glass.aiff, to check the sound and output device. - In System Settings > Notifications, allow your terminal app. Banners from
osascriptare listed under Script Editor. Also check that a Focus isn't silencing them. - If you hear every alert twice, two setups are firing, such as a hook and the terminal bell. Keep one.
Which should you use?
| Method | Setup | Remote sessions | Many sessions |
|---|---|---|---|
| Built-in notification | None in Ghostty or Kitty, one setting in iTerm2 | Yes, through the terminal | One alert per terminal |
| Terminal bell | One setting | Yes, through the terminal | Hard to tell apart |
| Hooks | JSON plus a script | Runs on the remote machine | One alert per session |
| Notchbird | Install the app (add an SSH alias for another machine) | Yes, one SSH machine alongside this Mac | One inbox for all of them |
Common questions
Why don't I get Claude Code notifications in Apple Terminal?
By default Claude Code sends desktop notifications only in Ghostty, Kitty and iTerm2. In Apple Terminal, set preferredNotifChannel to terminal_bell in ~/.claude/settings.json, or add a Notification hook.
How do I get notified every time Claude Code finishes a turn?
Add a Stop hook in ~/.claude/settings.json that runs a command such as afplay or osascript. The Stop event fires every time Claude finishes responding.
Do Claude Code notifications work over SSH?
Yes. The built-in desktop notification travels back through your terminal, and Ghostty and Kitty forward it to macOS. In iTerm2 enable escape sequence alerts, and in tmux enable allow-passthrough. Hooks run on the remote machine instead.
Can I get alerts from Claude Code on the web?
Not on your Mac directly. Cloud sessions run on Anthropic's machines and don't read your local settings or hooks. Run claude --teleport in a checkout of the same repository to continue the session in your terminal, where it alerts like any local session.
Want this without wiring up hooks? Notchbird shows Claude Code and Codex alerts in your MacBook's notch, with one click back to the session.
Try Notchbird free