DEV Community

YairDaniel
YairDaniel

Posted on

Claude Notify: Desktop Notifications for Claude Code on Windows

If you use Claude Code inside VS Code, you know the workflow: send it a long task, switch over to the browser or another window, and then... forget to check back. Or the opposite - you keep alt-tabbing every couple of minutes just to see if it's done yet.

I built a small Windows tray app to fix that: Claude Notify. When Claude Code finishes responding, a short desktop notification pops up with a summary of what it said. Click it, and you're taken straight back to the right VS Code window and the right conversation - even if you have several windows open at once.

Repo: https://github.com/YairDaniel11/claude-notify
Direct download: https://github.com/YairDaniel11/claude-notify/releases/latest/download/ClaudeNotify.exe

What it does

  • Summarized notifications - shows a short summary of Claude's response (up to ~30 words), or just the beginning of the message if you'd rather skip summarization.
  • Click-to-focus - clicking a notification brings the correct VS Code window to the foreground and reopens the exact conversation, even across multiple open windows.
  • Stays out of your way - if the editor window is already visible on screen (fully or partially), no notification shows up, since you're already looking at the answer.
  • Matches your editor's theme - the popup reads VS Code/Cursor's own workbench.colorTheme setting and switches between light and dark to match, instead of just following the Windows system theme.
  • Simple settings UI - display time, popup corner, word count, which editor processes to watch, launch on startup, one-click install/remove of the Claude Code hook.

How it works (the fun technical bits)

A few things turned out trickier than expected:

  • Finding the right window: it enumerates top-level windows belonging to your editor's process(es) and matches the project folder name against the window title to figure out which window triggered the notification.
  • Actually focusing it: Windows blocks background processes from calling SetForegroundWindow on arbitrary windows (the "foreground lock"). Since this app lives in the tray with no window of its own in the foreground, a plain call to it mostly fails. The workaround is the classic AttachThreadInput trick - temporarily attaching the input queue of the calling thread to the current foreground window's thread, which grants permission to switch focus reliably, even with 3+ windows open.
  • Deep-linking into the right session: once the window is genuinely focused, it opens a vscode:// / cursor:// URI with the session id, which VS Code's Claude Code extension resolves to the right conversation.
  • Theme detection: it reads workbench.colorTheme straight out of VS Code's own settings.json (handling JSONC comments and trailing commas, since VS Code's config isn't strict JSON), checking the workspace-level settings file first and falling back to the user-level one, then falls back to the Windows system theme if nothing can be read.

Installation

No installer, no admin rights needed:

  1. Run ClaudeNotify.exe.
  2. In the settings window, click "Install connection to Claude Code".
  3. If notifications don't show up, run /hooks once in Claude Code, or just restart it.

That's it - the button copies itself to %LOCALAPPDATA%\ClaudeNotify and adds a Stop hook to %USERPROFILE%\.claude\settings.json (a .bak backup is created automatically, and your other settings are left untouched).

Limitations

  • Windows only - it's built with WinForms and .NET Framework (already on every Windows 10/11 machine), so no installer is needed, but also no macOS/Linux support is planned, since the whole focus/theme-detection mechanism is Windows-specific.
  • The .exe isn't code-signed, so Windows SmartScreen will warn on first run ("More info" → "Run anyway"). Source is a single ~30KB C# file, fully readable, and you can build it yourself with the included build.cmd.

License

MIT. Source, issues, and the latest release are all at https://github.com/YairDaniel11/claude-notify.

Built almost entirely with Claude Code itself - happy to hear feedback, bug reports, or feature ideas.

Top comments (0)