ClaudeHack
0

Play a sound when Claude needs attention via Notification hooks

Terminal / Productivity / Cost Optimization·13 hours ago·verified 13 hours ago·easy·~5 min setup·verified

Add a Notification hook that plays a short sound when Claude is idle or waiting on permission so you can multitask without staring at the terminal.

The problem

You kick off a long agent run, context-switch, and only notice minutes later that Claude has been blocked on a permission prompt.

The hack

Configure a Notification hook in settings.json that runs `afplay`/`aplay` asynchronously when Claude fires a notification event.

Why it works

Hooks are deterministic — unlike hoping you notice the spinner stop. Anthropic’s hooks system and power-user tips both push terminal notifications for multi-session workflows.

Setup

1. Pick a short sound file (e.g. `~/.claude/notify.mp3`). 2. Add a Notification hook in `~/.claude/settings.json` with `"async": true`. 3. macOS example command: `afplay ~/.claude/notify.mp3`. 4. Trigger a permission-gated task and confirm the sound fires. 5. Commit project-level hooks if the whole team wants the same cue.

Code

{
  "hooks": {
    "Notification": [{
      "hooks": [{
        "type": "command",
        "command": "afplay ~/.claude/notify.mp3",
        "async": true
      }]
    }]
  }
}

Source

anthropic·View original →·by Anthropic

Does this still work?

0 said it works · 0 said it's broken

Related

Discussion

No comments yet. Be the first to say whether this worked for you.