Audio Notification Hooks: Know Which Session Finished

James Phoenix
James Phoenix

Summary

When running multiple Claude Code sessions in parallel, you need to know when each one finishes without constantly checking every terminal window. A Stop hook that plays a system sound via afplay lets you walk away and come back when you hear the chime. Simple config, high impact for multi-session workflows.

The Problem

Running 4-6 parallel Claude Code sessions means constant window-switching to check progress. You end up either:

  1. Polling: Alt-tabbing through windows every 30 seconds, breaking your focus
  2. Missing completions: A session finishes, sits idle for 10 minutes while you are focused elsewhere
  3. Walking away blind: Leaving your desk with no idea whether sessions are done

Visual notifications (macOS alerts, menubar badges) get lost in the noise. You need something that interrupts ambient attention without requiring screen focus.

The Solution

Add a Stop hook to ~/.claude/settings.json that plays a system sound when Claude Code finishes a response:

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

How it works

  1. Claude Code finishes processing (any session)
  2. The Stop hook fires
  3. afplay plays the system sound
  4. You hear the chime from across the room and know a session is ready

Available macOS system sounds

Pick a sound that cuts through your environment:

Sound Path Character
Blow /System/Library/Sounds/Blow.aiff Soft whoosh
Glass /System/Library/Sounds/Glass.aiff Sharp ping
Ping /System/Library/Sounds/Ping.aiff Clean notification
Pop /System/Library/Sounds/Pop.aiff Short bubble
Tink /System/Library/Sounds/Tink.aiff Light tap
Hero /System/Library/Sounds/Hero.aiff Achievement tone
Submarine /System/Library/Sounds/Submarine.aiff Deep sonar

Test them: afplay /System/Library/Sounds/Glass.aiff

Different sounds per session

If you want to distinguish which session finished, you can use project-level settings (.claude/settings.json in each project directory) with different sounds. Or use a script that incorporates the working directory:

#!/bin/bash
# ~/.claude/hooks/stop-sound.sh
# Play different sounds based on project directory
case "$PWD" in
  */octospark*) afplay /System/Library/Sounds/Hero.aiff ;;
  */knowledge-base*) afplay /System/Library/Sounds/Glass.aiff ;;
  *) afplay /System/Library/Sounds/Blow.aiff ;;
esac
{
  "hooks": {
    "Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "bash ~/.claude/hooks/stop-sound.sh"
          }
        ]
      }
    ]
  }
}

Linux alternative

Replace afplay with paplay or aplay:

{
  "hooks": {
    "Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "paplay /usr/share/sounds/freedesktop/stereo/complete.oga"
          }
        ]
      }
    ]
  }
}

Integration with Parallel Workflows

This hook becomes essential when combined with:

Leanpub Book

Read The Meta-Engineer

A practical book on building autonomous AI systems with Claude Code, context engineering, verification loops, and production harnesses.

Continuously updated
Claude Code + agentic systems
View Book
  • YOLO mode: Sessions run autonomously, so you are not watching the terminal. The sound tells you when to check in.
  • 4-6 parallel sessions: Without audio cues, you would need to visually poll every window.
  • Walk-away workflows: Start a plan or implementation, leave the desk, return when you hear the sound.

The pattern: start work in a session, switch to the next window, hear the chime, cycle back and react. Audio becomes the scheduling signal for your attention across parallel agents.

Related

References

Topics
AutomationClaude CodeDeveloper ExperienceLong Running AgentsMonitoringMulti Agent SystemsWorkflows

Newsletter

Become a better AI engineer

Weekly deep dives on production AI systems, context engineering, and the patterns that compound. No fluff, no tutorials. Just what works.

Join 306K+ developers. No spam. Unsubscribe anytime.


More Insights

Cover Image for Developers Are Having an Identity Crisis

Developers Are Having an Identity Crisis

Deedy Das named it: most software engineers are facing an identity crisis bordering on depression. He is right that it is happening, and right about how it looks. He is wrong about what it is. The crisis is not that you turned out to be lazy, or that the craft you loved is dying. It is that the one thing your identity was built on, understanding the code you ship, just got decoupled from shipping it. The way out is not to cling harder to the old identity. It is to find the one worth having now.

James Phoenix
James Phoenix
Cover Image for Why a Pure Reducer Beat MailerLite for Lifecycle Email

Why a Pure Reducer Beat MailerLite for Lifecycle Email

How a pure reducer plus Resend collapsed the cost of running lifecycle email, and why the automation-SaaS calculus flipped.

James Phoenix
James Phoenix