Claude Code on Windows: get notified when it’s done

Updated

Quick answer

On Windows, Claude Code shows no notification by default in Windows Terminal or PowerShell. A Stop hook that calls PowerShell can show a toast or play a sound, natively or from WSL through powershell.exe. For an alert when you are away from the PC, send the same moment to your phone.

What Windows Terminal does by default

Claude Code’s built-in alert only knows a few terminals: it sends a desktop notification in iTerm2, Ghostty and Kitty, and does nothing elsewhere, Windows Terminal and PowerShell included. One setting changes that: "preferredNotifChannel": "terminal_bell" in %USERPROFILE%\.claude\settings.json makes Claude Code ring the terminal bell. In Windows Terminal, the profile’s bellStyle decides what a bell does: "bellStyle": "all" plays a sound and flashes the taskbar icon, and bellSound picks the sound file. It still comes late, about a minute after Claude finishes, and says nothing about what it did. A hook does better.

How hooks run on Windows: a hook’s command goes through Git Bash if Git for Windows is installed, and through PowerShell if it isn’t. Add "shell": "powershell" to a hook to choose PowerShell either way. Claude Code uses PowerShell 7 (pwsh.exe) when it finds it, and Windows PowerShell 5.1 otherwise.

A PowerShell hook

The smallest useful hook plays a sound when Claude finishes. PlaySync waits for the sound to end, so it isn’t cut off when the hook exits:

%USERPROFILE%\.claude\settings.json

{
  "hooks": {
    "Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "shell": "powershell",
            "command": "(New-Object System.Media.SoundPlayer 'C:\\Windows\\Media\\tada.wav').PlaySync()"
          }
        ]
      }
    ]
  }
}

For a permission prompt, Anthropic’s hooks guide uses a dialog box on the Notification event: [System.Windows.Forms.MessageBox]::Show('Claude Code needs your attention', 'Claude Code'), after loading System.Windows.Forms. It works, but a dialog can open behind your terminal window and waits for a click. A toast is kinder.

Real toasts with BurntToast

BurntToast is a PowerShell module for Windows notifications. Install it once, for your user only:

In PowerShell

Install-Module -Name BurntToast -Scope CurrentUser
New-BurntToastNotification -Text 'Claude Code', 'Test'

Then a script can show the project and what Claude said. Save it as %USERPROFILE%\.claude\hooks\done.ps1:

done.ps1

# Stop hook: a toast with the project and Claude's last message.
$hook = [Console]::In.ReadToEnd() | ConvertFrom-Json
# A subagent still running: wait for the real end. Other background tasks don't count.
if (@($hook.background_tasks | Where-Object { $_.type -eq 'subagent' }).Count -gt 0) { exit 0 }
$project = Split-Path -Leaf $hook.cwd
$msg = "$($hook.last_assistant_message)"
if ($msg.Length -gt 180) { $msg = $msg.Substring(0, 180) }
New-BurntToastNotification -Text "Claude Code · $project", $msg

And point the hook at it

{ "type": "command", "shell": "powershell", "command": "& \"$env:USERPROFILE\\.claude\\hooks\\done.ps1\"" }

If Windows refuses to run the script, allow local scripts for your account once with Set-ExecutionPolicy -Scope CurrentUser RemoteSigned. Toasts follow Windows’ notification settings: Do not disturb hides them, and they wait in the notification center.

The same script can serve the Notification hook, for the moments Claude waits in the middle of a turn. That event sends a message, such as “Claude needs your permission”, instead of last_assistant_message, so take whichever is there: $msg = "$($hook.last_assistant_message)$($hook.message)". Give the hook the matcher permission_prompt|elicitation_dialog so sign-ins and other notices stay quiet. PowerShell reads the JSON itself with ConvertFrom-Json; there is nothing to install for that.

Under WSL

When Claude Code runs inside WSL, its hooks run in Linux, where notify-send usually has no desktop to show on. Call Windows instead: WSL can start powershell.exe through Windows interop, as long as it is on your PATH.

A Stop hook in WSL’s ~/.claude/settings.json

{
  "hooks": {
    "Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "powershell.exe -NoProfile -Command \"New-BurntToastNotification -Text 'Claude Code', 'Claude finished'\""
          }
        ]
      }
    ]
  }
}

Install BurntToast on the Windows side first, and test the command in your WSL shell before you rely on the hook. The quoting is the usual trap: the command passes through JSON, then the Linux shell, then PowerShell, so keep the PowerShell part in double quotes escaped for JSON, and the texts inside it in single quotes. To show Claude’s last message, write a small shell script that reads it with jq and passes it to powershell.exe as an argument.

When you’re away from the PC

A toast waits on a screen nobody is looking at. To carry the moment to your phone, a hook can post to a push service such as ntfy with curl, which works in Git Bash, PowerShell and WSL, one-way. Monish sends permission prompts, questions and finished turns to your iPhone with buttons to answer: install the app and open Other ways to install: in PowerShell or Windows Terminal, run irm https://monish.cc/install.ps1 | iex, then monish pair with the 6-digit code the app shows. In WSL, run the main line, curl -fsSL https://monish.cc/install.sh | sh -s with the code, inside WSL, where Claude Code runs. Outside WSL, Monish’s Windows support is in beta.

Questions

Why does my hook’s dialog open behind the terminal?
A MessageBox is a window, not a notification, so it can open behind the active one. Use a toast with BurntToast, or a sound, instead.
Do Claude Code hooks need Git Bash on Windows?
No. Without Git for Windows, Claude Code runs a hook’s command through PowerShell. Set shell to powershell on a hook to use PowerShell even when Git Bash is installed.
Can Claude Code in WSL show Windows notifications?
Yes, through Windows interop: a hook can run powershell.exe, as long as it is on your PATH inside WSL.
Which sound files can I use?
Any .wav file. Windows keeps its own in C:\Windows\Media, such as tada.wav or chimes.wav.

More guides

New to Monish? The home page shows what lands on your iPhone, and all guides are listed here.

Get Monish on your iPhone

Free, no account. Your 6-digit code is waiting in the app.

Download on the App Store