How to get a notification on Mac or Windows when Claude Code finishes a turn
Claude Code notifies you by itself in Ghostty, Kitty and iTerm2. In any other terminal, set preferredNotifChannel to ring the bell, or add a Stop hook that posts a macOS notification each time a turn ends. Agent HUD shows every finished turn at the edge of your screen without either.
Updated 2026-11-22
What Claude Code does by default
Out of the box, Claude Code sends a desktop notification when it detects Ghostty, Kitty or iTerm2. In iTerm2, also turn on Notification Center Alerts and Send escape sequence-generated alerts in its settings. Apple's Terminal gets at most a bell, and other terminals get nothing.
The setting behind this is preferredNotifChannel, shown in /config as Local notifications. Its values are auto (the default), terminal_bell, iterm2, iterm2_with_bell, kitty, ghostty and notifications_disabled.
Ring the bell in any terminal
Add this to ~/.claude/settings.json to make Claude Code ring the terminal bell, whichever terminal it runs in:
{
"preferredNotifChannel": "terminal_bell"
}What the bell does is up to the terminal: a sound, a badge on the Dock icon, or a mark on the tab.
A macOS notification for every finished turn
A Stop hook runs when Claude Code has finished responding. This one posts a notification with osascript, which every Mac has:
{
"hooks": {
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "osascript -e 'display notification \"Claude Code finished\" with title \"Claude Code\"'"
}
]
}
]
}
}Put it in ~/.claude/settings.json for all your projects, or in a project's .claude/settings.json. If the file already has a hooks block, add Stop inside it. Run /hooks in Claude Code to see that it was read.
Stoptakes no matcher, so it runs after every turn.- It does not run when you interrupt the turn yourself.
- A subagent that finishes raises
SubagentStop, notStop. - The hook runs alongside Claude Code's own notification, not in place of it.
If no notification appears
Notifications sent with osascript belong to Script Editor, and macOS drops them silently until Script Editor may send notifications. Run the line below once in a terminal, then allow Script Editor under System Settings → Notifications.
osascript -e 'display notification "test"'Only when Claude Code is waiting for you
The Notification hook runs when Claude Code itself raises a notice: about six seconds after a permission prompt appears (permission_prompt), and about 60 seconds after a reply if you have typed nothing since (idle_prompt). An empty matcher covers every kind.
{
"hooks": {
"Notification": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "osascript -e 'display notification \"Claude Code needs your attention\" with title \"Claude Code\"'"
}
]
}
]
}
}With a sound
To hear when a turn ends, give the Stop hook a sound to play. afplay and the system sounds are on every Mac:
{
"hooks": {
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "afplay /System/Library/Sounds/Glass.aiff"
}
]
}
]
}
}Any file in /System/Library/Sounds works, such as Ping.aiff or Hero.aiff. To get the banner and the sound together, put both commands in the hook's list.
On your phone and watch
A notification on the Mac does not help when you have walked away. Claude Code can push to your phone while Remote Control is connected: in /config, turn on Push when Claude decides, Push when actions required, or both, with the Claude app installed and signed in to the same account.
With Agent HUD Remote, a finished turn and a waiting request reach your iPhone and Apple Watch as notifications, for Claude Code and your other agents alike.
Claude Code: Remote Control and mobile pushControl Claude Code and Codex from iPhone and Apple Watch: Agent HUD Remote
On Windows
The settings file is the same one, at %USERPROFILE%\.claude\settings.json, and preferredNotifChannel works there too: terminal_bell rings the bell in Windows Terminal or any other terminal.
The osascript hooks above are for the Mac only. On Windows, give the Stop hook a PowerShell command of your own, or let Agent HUD show the reply.
With Agent HUD: no settings to write
Agent HUD shows a New reply card at the edge of your screen when Claude Code finishes a turn, in the terminal or in the Claude desktop app. The card carries the session's title, the opening lines of the reply and how long the turn ran, and Return to session takes you back in one click.
It does the same for Codex and the other agents it follows, on the Mac and on Windows 10 and 11, so the replies of all of them arrive in one place. The card appears in the HUD, not in Notification Centre, and makes no sound.

Claude Code and Codex notifications on Mac and Windows: replies and quota alertsClaude Code
Which one to use
| Way | Setup | What you get |
|---|---|---|
| Default | None in Ghostty, Kitty and iTerm2 | A desktop notification from the terminal |
preferredNotifChannel | One line in settings | The terminal bell in any terminal |
Stop hook | A block in settings | A macOS notification after every turn, with the text you wrote |
| Agent HUD | Install the app | A card with the reply's opening lines and one click back, for every agent |
Questions
How do I get a notification when Claude Code finishes a turn on a Mac?
In Ghostty, Kitty and iTerm2 Claude Code sends one by itself. Elsewhere, set preferredNotifChannel to terminal_bell, or add a Stop hook to ~/.claude/settings.json that runs osascript to post a macOS notification. Agent HUD shows a New reply card for every finished turn with no settings to write.
Why does my Claude Code Stop hook show no notification?
Notifications sent with osascript belong to Script Editor, and macOS drops them until Script Editor is allowed under System Settings → Notifications. A turn you interrupt yourself does not run the Stop hook either.
What is the difference between the Stop hook and the Notification hook?
Stop runs each time Claude Code finishes responding. Notification runs when Claude Code raises a notice of its own: a few seconds after a permission prompt, or about a minute after a reply you have not answered.
Does the notification work in VS Code's terminal or Apple's Terminal?
Not by default. Claude Code sends desktop notifications only in Ghostty, Kitty and iTerm2. A Stop hook works in any terminal, because macOS posts the notification, not the terminal.
Does Agent HUD need a hook I write myself?
No. Install Agent HUD and it follows Claude Code on its own. The reminder appears in the HUD, with one click back to the session.
