Play Windows notification sounds and flash the taskbar icon when Claude Code needs your attention - so you can multitask without constantly checking back.
| Event | Default Sound | Taskbar Flash | When |
|---|---|---|---|
| Stop | chimes | yes | Claude finished responding |
| Input | Windows Exclamation | yes | Permission prompt or question |
| Task Complete | ding | no | A task is marked complete |
| Subagent Stop | (off) | no | A subagent finished (disabled by default - can fire after Stop, causing confusing double sounds) |
The taskbar flash is suppressed when the terminal window is already focused.
Works universally in VS Code, Windows Terminal, cmd, PowerShell, and any embedded terminal.
Paste this into Claude Code:
Install the Claude Code notification sound system from this gist: https://gist.github.com/Shilo/2e064b7010ec172af89404ba0af34854
1. Download `notify.ps1` from the gist and save it to `~/.claude/notify.ps1`
2. Read my current `~/.claude/settings.json`, then merge the `hooks` key from the gist's `settings.json` into it (don't overwrite other settings)
3. Confirm what was done
- Download
notify.ps1from this gist and save it to~/.claude/notify.ps1 - Open
~/.claude/settings.jsonand merge thehookskey fromsettings.jsonin this gist into it - Restart Claude Code (hooks take effect in new sessions)
Edit the config at the top of ~/.claude/notify.ps1:
$stopSound = 2 # chimes
$inputSound = 3 # Windows Exclamation
$taskCompleteSound = 1 # ding
$subagentStopSound = 0 # off| # | Sound |
|---|---|
| 0 | off (no sound) |
| 1 | ding.wav |
| 2 | chimes.wav |
| 3 | Windows Exclamation.wav |
| 4 | notify.wav |
| 5 | chord.wav |
| 6 | Windows Proximity Notification.wav |
| 7 | tada.wav |
$stopFlash = $true # flash on stop
$inputFlash = $true # flash on inputOnly stop and input events support flashing. All other events never flash.
PowerShell has no built-in cmdlet for flashing a window's taskbar icon, so the script uses Add-Type to P/Invoke the Win32 FlashWindowEx API directly. This is necessary for three reasons:
-
No PowerShell alternative exists. There is no native PowerShell or .NET method to flash a taskbar icon. The only way is through the Win32
user32.dllAPI. -
Finding the right window handle. The script needs to locate the correct parent window to flash - which varies by environment. In a standalone terminal,
GetConsoleWindow()would work, but it returns a hidden conhost handle in Windows Terminal and returns nothing in VS Code's integrated terminal. Instead, the script builds a process tree via a single WMI query and walks up from the current PowerShell process until it finds an ancestor with a visible window (IsWindowVisible). This reliably finds the correct window in any host: VS Code, Windows Terminal, cmd, PowerShell, or any embedded terminal. -
Foreground suppression. The script checks
GetForegroundWindow()before flashing and skips it if the terminal window is already focused - so you only get flashed when you're actually away.
- Windows 10/11
- PowerShell (built-in)
- No external dependencies - uses
C:\Windows\Media\WAV files