
Claude Code’s Stop hook plays a sound on completion, halving task turnaround
Anand Rathnas added a system‑sound notification to Claude Code’s Stop hook, cutting his average task turnaround time by 50 % and giving him audible cues for success and error states. The hook receives JSON on stdin, enabling custom scripts for any situation.
Anand Rathnas uses Claude Code as his primary coding assistant while developing the jo4.io platform [devto]. He noticed that each time Claude finished a response or asked a question, the interaction remained silent, offering no immediate cue that work could resume [devto]. To solve this, Rathnas edited the Claude configuration file at ~/.claude/settings.json and enabled the Stop hook, which fires whenever Claude hands control back to the user [devto]. The hook runs a user‑supplied command; Rathnas pointed it at a simple script that plays the macOS “Funk” system sound [devto]. After the change, his average task turnaround time dropped by half, a measurable boost to his daily productivity [devto]. The Stop hook supplies JSON on stdin, including a last_assistant_message field that scripts can inspect to decide which sound to emit [devto]. By branching on that field, a Bash script can play a success chime when test results are green and an error tone when a build fails [devto]. This flexibility lets users map any Claude event to a distinct audible alert, turning silent completions into clear signals [devto]. Rathnas reports that the audible feedback reduces the mental load of watching the terminal for prompts, letting him stay in the flow of coding [devto]. The approach requires only a few lines of JSON and a shell script, making it accessible to anyone familiar with Claude’s hook system [devto]. As a result, the Stop hook becomes a lightweight productivity layer that integrates seamlessly with existing development tools [devto].
Subscribe to the broadcast.
Daily digest of the day's most important tech news. No fluff. Engineering signal only.
// delivered via substack · double-opt-in confirmation


