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 tone
  • Pop.aiff - Soft pop sound
  • Sosumi.aiff - Classic Mac chime
  • Blow.aiff - Soft blow sound
  • Bottle.aiff - Bottle pop
  • Frog.aiff - Frog croak
  • Funk.aiff - Funky tone
  • Hero.aiff - Heroic fanfare
  • Morse.aiff - Morse code beep
  • Purr.aiff - Cat purr
  • Submarine.aiff - Submarine sonar
  • Tink.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).