Skip to main content

Notification Sound for Claude Code

When running multiple Claude Code sessions in VS Code, it's hard to tell which one finished. This guide sets up a macOS notification with sound that fires every time Claude finishes a response, showing which project completed.


Prerequisites

Install terminal-notifier via Homebrew:

brew install terminal-notifier

Configuration

Add a Stop hook to ~/.claude/settings.json. The Stop event fires every time Claude finishes responding, regardless of whether the terminal is focused. (You can also add this hook at project scope in .claude/settings.json if you only want it for specific projects.)

{
"hooks": {
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "terminal-notifier -title 'Claude Code' -message \"Done in $(basename $PWD)\" -sound Glass -ignoreDnD"
}
]
}
]
}
}

Restart Claude Code after editing the file.


What It Does

  • -title 'Claude Code': sets the notification title
  • -message "Done in $(basename $PWD)": shows the project folder name, so you know which session finished
  • -sound Glass: plays the macOS Glass sound (alternatives: Ping, Submarine, Hero)
  • -ignoreDnD: shows the notification even in Do Not Disturb mode

macOS Notification Settings

After the first notification fires, go to System Settings → Notifications → terminal-notifier and configure:

  • Allow notifications: On
  • Notification style: Choose Alerts if you want the notification to stay on screen until dismissed. Choose Banners if you prefer it to disappear automatically.

Why Not Other Approaches

ApproachProblem
Notification hookOnly fires on attention-requiring events (permission, auth, or idle prompts), so it won't fire when Claude simply finishes a normal response
printf '\a' (terminal bell)VS Code's integrated terminal doesn't show a visible indicator
printf '\e]0;DONE\a' (tab title)Hook runs in a subprocess, so stdout doesn't reach the terminal
osascript display notificationCan show a "Show" button that opens Script Editor (behavior varies by macOS version)
terminal-notifier -sender com.microsoft.VSCodeRoutes notifications through VS Code's notification settings, which may be disabled

Customization

Change the sound:

"command": "terminal-notifier -title 'Claude Code' -message \"Done in $(basename $PWD)\" -sound Ping -ignoreDnD"

Available macOS sounds: Basso, Blow, Bottle, Frog, Funk, Glass, Hero, Morse, Ping, Pop, Purr, Sosumi, Submarine, Tink.