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 Measuring Coding Agent Leverage

Measuring Coding Agent Leverage

Token volume measures spend, not output. Leverage is what your agents turn into verified, valuable change per unit of human attention, compute, and rework, and no single number captures it. You have to triangulate from several points of view.

James Phoenix
James Phoenix
Cover Image for Using DSL Languages for LLM Harnesses

Using DSL Languages for LLM Harnesses

Unmesh Joshi’s article [DSLs Enable Reliable Use of LLMs](https://martinfowler.com/articles/llm-and-dsls.html) (martinfowler.com, July 2026) names the endgame of something I have been documenting piecemeal for a year: the smaller the language you make the model speak, the less room it has to be wrong.

James Phoenix
James Phoenix