Signal with Audio Sound When CC is Done (or need user input)

What

Configure claude code to play sound when its done or needs your input.

Why

So that you dont have to check the terminal to see if it has finished and instead be gently notified when Claude code has completed (or is waiting for your input).

How

Put the following hooks section into your $HOME/.claude/settings.json to play sound when claude code is done:

Mac example

The following should work out of the box without having to download sounds.

{
  "hooks": {
    "Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "afplay /System/Library/Sounds/Funk.aiff"
          }
        ]
      }
    ],
    "Notification": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "afplay /System/Library/Sounds/Purr.aiff"
          }
        ]
      }
    ]
  }
}
Linux example

You need to install mpg123 and download sounds that work for you. I used https://freesound.org to download sounds.

  "hooks": {
    "Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "mpg123 /Users/nkondrat/vintrin-env/data/audio/done/done-sound-1.mp3"
          }
        ]
      }
    ],
    "Notification": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "mpg123 /Users/nkondrat/vintrin-env/data/audio/notification/piano-notification-5a.mp3"
          }
        ]
      }
    ]
  }

References