Overview
When working with Claude Code on longer tasks, it's easy to get distracted while waiting for a response. Here's how to set up an audio notification that plays when Claude finishes responding.
The Prompt
Copy and paste this prompt into Claude Code to set up your notification sound:
Add an audio notification hook to my Claude Code settings that plays a sound when a prompt completes. Use the macOS system sound "Glass.aiff" with volume level 5.
How It Works
Claude Code supports "hooks" that run shell commands in response to events. The Stop hook triggers when Claude finishes a response. The command uses macOS's built-in afplay utility to play a system sound.
Manual Setup
If you prefer to set it up manually, add this to your ~/.claude/settings.json file:
{
"hooks": {
"Stop": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "afplay -v 5 /System/Library/Sounds/Glass.aiff"
}
]
}
]
}
}Important: You must restart your Claude Code session for the audio hook to take effect.
Customization
Once your hook is set up, you can easily customize it by simply prompting Claude Code:
- Change volume: "Change my audio hook volume to 3"
- Change sound: "Change my notification sound to Ping.aiff"
- Preview sounds: "Play the Pop system sound for me"
Available System Sounds
macOS includes several built-in sounds you can use:
Glass.aiff- Subtle glass tap (default)Ping.aiff- Clear ping tonePop.aiff- Soft pop soundSosumi.aiff- Classic Mac chimeBlow.aiff- Soft blow soundBottle.aiff- Bottle popFrog.aiff- Frog croakFunk.aiff- Funky toneHero.aiff- Heroic fanfareMorse.aiff- Morse code beepPurr.aiff- Cat purrSubmarine.aiff- Submarine sonarTink.aiff- Light tink
All sounds are located at /System/Library/Sounds/. Volume values range from 0 (silent) to higher numbers for louder playback (default is 1).