My ~/.claude/settings.json with full solution
I've been looking for a way to get notified when Claude Code needs my input or is finished. Big shout out to u/Ok-Engineering2612 on Reddit for this post: WSL Toast Notifications with Hooks in Claude Code : r/ClaudeAI. I had been trying to do the same thing with BurntToast but I forget the way WSL interops with Windows.
The settings from the Reddit thread did need a little tweaking ($PAYLOAD is no longer supported and now Claude Code sends the JSON structure via stdin). Here's my change to the command:
The settings from the Reddit thread did need a little tweaking ($PAYLOAD is no longer supported and now Claude Code sends the JSON structure via stdin). Here's my change to the command:
"command": "input=$(cat) && powershell.exe -NoProfile -Command \"Import-Module BurntToast; New-BurntToastNotification -Text 'Claude Code Notification', '$(echo \"$input\" | jq -r '.message')'\""
Here is the full documentation for hooks: Hooks reference