$ cat get-notified-when-claude-code-finishes-a-task.md

Get notified when Claude Code finishes a task

July 26, 2025

I’ve been using Claude Code lately, and I found myself wanting a simple way to know when Claude finished a task. Instead of watching the terminal, I figured a quick notification sound would do the trick. Luckily, Claude supports hooks, which are customizable actions that run when certain events occur. By editing the settings.local.json file in your project after init’ing, you can make Claude play a macOS system sound whenever a task completes.

Here’s the hook configuration I added to my file:

{
  "permissions": {
    "allow": ["Bash(bin/rails runner:*)"],
    "deny": []
  },
  "hooks": {
    "Notification": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "afplay /System/Library/Sounds/Hero.aiff"
          }
        ]
      }
    ]
  }
}

This runs the afplay command to play the classic “Glass” sound that macOS ships with. It works every time Claude finishes running, giving me instant audible feedback that a process has ended. It also plays a different sound when Claude needs your attention. It’s a small tweak, but it makes the workflow feel more complete and less like I’m waiting around for something to silently finish. Hope you enjoy this tip!

  • Finder
    Finder
  • Jesse Waites
    Jesse Waites
  • Xcode
    Siri
  • Simulator
    Simulator
  • Testflight
    Testflight
  • SF Symbols
    SF Symbols
  • Icon Composer
    Icon Composer
  • Sketch
    Sketch
  • VS Code
    VS Code
  • Postgres
    Postgres
  • Android Studio
    Android Studio
  • Trash
    Trash