How to make Claude Code play a sound when it's done
Add a Stop hook to ~/.claude/settings.json that runs afplay /System/Library/Sounds/Glass.aiff. Claude Code runs it the moment Claude finishes responding. For a different sound when Claude asks for permission, add a PermissionRequest hook too. For a plain bell, set preferredNotifChannel to "terminal_bell"; for distinct chimes across every agent, use Ambient.
The quickest way: a Stop hook
Stop runs when Claude finishes responding. Add this to ~/.claude/settings.json:
{
"hooks": {
"Stop": [
{ "hooks": [{ "type": "command", "command": "afplay /System/Library/Sounds/Glass.aiff", "async": true }] }
]
}
}
"async": true plays the sound in the background, so it never holds Claude up. If your file already has a hooks key, add Stop next to the events in it. Restart open sessions, or type /hooks to check it's registered.
A different sound when Claude needs you
A finished turn and a permission request deserve different sounds. PermissionRequest runs the moment Claude is about to ask you to approve a tool:
{
"hooks": {
"Stop": [
{ "hooks": [{ "type": "command", "command": "afplay /System/Library/Sounds/Glass.aiff", "async": true }] }
],
"PermissionRequest": [
{ "hooks": [{ "type": "command", "command": "afplay /System/Library/Sounds/Ping.aiff", "async": true }] }
]
}
}
A sound command prints nothing, so Claude still asks you as usual. (A PermissionRequest hook that printed a decision would approve or deny for you.)
Pick a sound
macOS keeps its alert sounds in /System/Library/Sounds: Basso, Blow, Bottle, Frog, Funk, Glass, Hero, Morse, Ping, Pop, Purr, Sosumi, Submarine and Tink. Try one in a terminal with afplay /System/Library/Sounds/Hero.aiff, and make it quieter with afplay -v 0.4 ….
Or just the terminal bell
// ~/.claude/settings.json
{
"preferredNotifChannel": "terminal_bell"
}
Claude Code rings the bell when it finishes a task or pauses for permission while you seem to be away. If you accepted Claude Code's first-run terminal setup in Apple's Terminal, it turned the audible bell off; turn it back on under Settings › Profiles › Advanced › Audible bell.
Ambient: one chime per state, only when it matters
Ambient plays soft two-note chimes, a different one for needs you, done and error, so you know which without looking. It stays quiet while you're already in the app running the agent, skips turns shorter than 20 seconds by default, and does the same for Codex and Gemini CLI. A notch island and a banner show which session it was, and a click takes you back to its tab or tmux pane.
Stop babysitting terminals.
Free for macOS 14 and later. Works with Claude Code, Codex and Gemini CLI.
Get AmbientCommon questions
Why does my hook sound play even when I'm watching Claude?
Hooks run every time, whether or not you're looking. Ambient checks which app is in front and stays quiet while you're in the one running the agent.
Why can't I hear the terminal bell?
If you accepted Claude Code's first-run terminal setup in Apple's Terminal, it turned off the audible bell. Turn it back on in Settings › Profiles › Advanced › Audible bell, and check that your Mac's volume is up.
Will the sound play every time a subagent finishes?
No. Stop runs when the main agent finishes responding. Subagents have their own SubagentStop event, which a Stop hook doesn't hear.
Sources
- Automate actions with hooks, Claude Code docs
- Hooks reference, Claude Code docs
- Configure your terminal for Claude Code, Claude Code docs
More guides: Claude Code notifications on Mac · Claude Code permission notifications