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.
Get Ambient Free for macOS 14 and later.
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 AmbientOr brew install --cask viveky259259/tap/ambient · Star on GitHub
Common 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.
How do I make Claude Code beep, ding or chime when it's done?
Add a Stop hook that runs afplay with a system sound, as shown above; Glass.aiff is a clear two-tone ding. If the terminal's own beep is enough, set preferredNotifChannel to terminal_bell. Ambient plays a soft two-note chime when a turn ends or Claude needs you, and stays quiet while you're already looking at the agent.
Can Claude Code play a sound when it needs input?
Yes. Add a Notification hook, or a PermissionRequest hook for the instant version, that plays a different sound from your Stop hook, so you can tell "done" from "waiting for you" by ear. The permission notification guide has the hook.
Can Claude Code read its answer aloud?
Claude Code has no text-to-speech of its own. With Ambient, select part of a reply in the Claude app, Codex or your terminal and press ⌥⎋: it reads the selection with a Mac voice, with Kokoro running offline on your Mac, or with OpenAI or ElevenLabs using your own key, and turns paths and code blocks into something worth hearing.
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 · Claude Code text to speech