How to get a sound when Claude Code finishes

Hear when Claude Code is done or needs you. Use its built-in hooks with a macOS sound, or let TapNoise connect it for you in Settings > Agents.

Give Claude Code a task and switch to another window, and the hard part is noticing when it has finished or is waiting for your answer. There are two routes: set up Claude Code’s own hooks yourself, or let TapNoise connect it for you.

The built-in route: Claude Code hooks

Claude Code can run a command of your choice at set moments. These are called hooks, and you set them in a settings file. For your own account, that file is ~/.claude/settings.json.

Two events matter here:

  • Stop fires when Claude finishes responding. It has no matcher, so it fires every time.
  • Notification fires when Claude sends a notification. It supports matchers, such as permission_prompt, which means Claude is waiting for you to approve something.

A command hook for Stop looks like this:

{
  "hooks": {
    "Stop": [
      {
        "hooks": [
          { "type": "command", "command": "afplay /System/Library/Sounds/Glass.aiff" }
        ]
      }
    ]
  }
}

afplay is a command that ships with macOS, and Glass.aiff is one of the system sounds in /System/Library/Sounds. You can point the command at any sound file. To get a notification instead, use osascript -e 'display notification "Claude is done"'.

Two cautions. If settings.json already has content, add the Stop entry inside the existing hooks object rather than replacing the file, and keep a backup. A stray comma will stop the file from parsing. Also check the current hook documentation on Claude Code’s site, since the format can change.

The easier route: TapNoise

TapNoise is a menu bar app with Agent Sounds. It plays a short cue when Claude Code finishes, when it needs you, or when a turn fails, in the sound theme you picked. Tappy, the keycap on your desktop, reacts to each one too.

  1. Open TapNoise Settings and go to Agents.
  2. Under Connect your agents, click Connect next to Claude Code.
  3. Restart Claude Code if it was already running. TapNoise notes that running agents pick up changes only after a restart.

Connecting edits your settings file in a limited way. TapNoise adds its own entries to the Stop, Notification (with the permission_prompt matcher) and StopFailure lists, placed after any hooks you already have. It leaves everything else in the file alone. It backs up the file first to ~/Library/Application Support/TapNoise/Agent hook backups. Clicking Remove takes TapNoise’s entries out again.

The hook sends only the agent’s name, whether it is done, needs you or hit an error, and the app it runs in. The Agents page has a “What TapNoise writes to” section that shows the exact entry before you connect.

Two more things in the same place:

  • Play agent sounds turns the cues on or off.
  • Knock twice to answer brings a waiting agent’s window forward. Knocks need an Apple silicon MacBook, as the Agents page says.

The Agents page is part of the license, so you need an activated copy of TapNoise to use it. A one-time purchase is US$7.99 plus tax, with a 14-day money-back guarantee.

Which one to pick

If you like to edit settings files, the hooks route costs nothing and needs only macOS. If you would rather not touch JSON, TapNoise connects Claude Code in one click, removes its entries in one click, and keeps a backup. Either way, the sound plays when Claude stops, which is the moment you were waiting for.

If you use Codex or Cursor too, the same Agents page connects them. See how to know when Codex is done for Codex.

About the author

Rudra Satani makes TapNoise. Spotted a mistake? Email support@tapnoise.com, or reach out at @rudraxx13.

Hear TapNoise on your Mac

Every sound is made by TapNoise itself. Try the sounds on the homepage first, then download the app.