Vahid Code Claude Notify
Get notified when Claude Code needs your attention, then click the notification to land in the exact VS Code window and Claude chat tab — on Linux as well as macOS.
Works with Claude Code in the terminal (CLI) and in the official VS Code extension.
Forked from Claude Code Notifier Plus by tutuge (MIT). Everything it does still works; this fork adds full click-to-focus on Linux and a few fixes listed below.
What this fork adds
|
Notifier Plus |
Vahid Code Claude Notify |
| Click-to-focus on macOS |
✅ |
✅ |
| Click-to-focus on Linux |
❌ banner only |
✅ raises the right window |
| Jump to the Claude chat tab of that session |
❌ |
✅ (Linux) |
Several VS Code instances (--user-data-dir) |
wrong window |
✅ the session's own instance |
| Folder inside a multi-root workspace |
opens a new window |
✅ the workspace window |
| Notification stays until clicked (GNOME) |
❌ hides after ~5 s |
✅ configurable |
| Sound per event, with preview |
one fixed sound |
✅ 10 bundled sounds |
| Duplicate menus/shortcut when both installed |
— |
hidden automatically, with a warning |
CLAUDE_CONFIG_DIR |
hooks ignored |
✅ hooks installed there too |
How Linux click-to-focus works
- The hook records which VS Code instance the session runs in (
VSCODE_PID) and the session id.
- The notification is sent with
notify-send -A, so clicking it runs an action.
- On click, the window owned by that VS Code process is raised with a pager-style
_NET_ACTIVE_WINDOW request, which GNOME's focus-stealing prevention allows.
- For chat-panel sessions,
vscode://anthropic.claude-code/open?session=<id> is sent to that same instance. Claude Code reveals the existing tab of the session; it does not open a duplicate.
- The window that got focus scrolls that chat to its latest message and puts the cursor back in the chat input (
scrollToLatestOnClick).
CLI sessions running in a VS Code terminal get the window raised, without the tab step.
Linux requirements
notify-send from libnotify 0.7.10 or newer (Ubuntu 22.04+, Fedora 34+). Older versions still show the notification, without a click action.
python3 (standard library only; uses libX11 through ctypes).
- An X11 session for window raising. On Wayland the click falls back to
code <folder>, which may not bring the window forward.
Features
- Dual-mode — CLI and VS Code extension sessions
- Click-to-focus — macOS (via
terminal-notifier) and Linux (see above)
- Task context — project name 📂 and task title 💬 in every notification
- A sound per event — 10 bundled sounds, preview them from Settings or the Command Palette
- Focus-aware suppression, configurable delay
- Multi-instance safe — one notification even with several VS Code windows open
- Auto-install — hooks are registered in
~/.claude/settings.json (and $CLAUDE_CONFIG_DIR/settings.json) on activation
- Add Selection to Claude Code — send the selected code to Claude's chat input
- i18n — English and Chinese
Installation
From the Marketplace: search for "Vahid Code Claude Notify".
From a VSIX:
code --install-extension vahid-code-claude-notify-1.0.0.vsix
Then reload VS Code (Ctrl/Cmd+Shift+P → "Developer: Reload Window").
If the original Claude Code Notifier Plus is also installed you will get two notifications per event, so disable one of them.
macOS click-to-focus
brew install terminal-notifier
Grant System Settings → Privacy & Security → Accessibility → terminal-notifier to jump to the exact project window.
Configuration
All settings are under claudeCodeNotifyFocus.*:
| Setting |
Default |
Description |
notifyOnPermissionRequest |
true |
Notify when Claude asks for permission |
notifyOnQuestion |
true |
Notify when Claude has a question |
notifyOnTaskComplete |
true |
Notify when Claude finishes a task |
notifyOnSubagentStop |
false |
Notify when a subagent finishes |
notificationTitle |
"✨ Claude Code" |
Title of every OS notification, e.g. "✨ Vahid Code" |
systemNotification |
true |
Show the OS notification |
sound |
true |
Master switch for sounds |
soundVolume |
60 |
Volume 0–100 (system volume on Windows) |
sounds.permissionRequest |
alert |
Sound for permission requests |
sounds.question |
chime |
Sound for questions |
sounds.taskComplete |
success |
Sound when a task finishes |
sounds.subagentStop |
pop |
Sound when a subagent finishes |
showVSCodePopup |
false |
Also show a VS Code popup |
notificationDelay |
0 |
Seconds before the OS notification (0–60) |
clickToFocus |
"window" |
window / app / off (below) |
scrollToLatestOnClick |
true |
Linux: after a click opens the chat tab, scroll to the latest message |
suppressWhenSessionTabActive |
true |
Skip the notification when the session's own Claude tab is in front in its focused window |
suppressWhenFocused |
false |
Skip the OS notification when VS Code is focused |
persistentNotification |
true |
Linux: keep the notification on screen until clicked or dismissed |
Sounds
Each event can have its own sound, or off. Ten sounds are bundled: Chime, Ding, Glass, Success, Alert, Knock, Pop, Bubble, Marimba and Doorbell. They are synthesized by scripts/generate-sounds.py, so they carry no third-party license.
To hear them before choosing:
- In Settings, each sound setting has a ▶ link per sound that plays it.
- Run Vahid Code Claude Notify: Choose Sound… from the Command Palette, pick an event, then move through the list; each sound plays as it is highlighted and Enter saves it.
Playback uses paplay / pw-play / aplay on Linux, afplay on macOS and PowerShell on Windows.
clickToFocus
| Value |
macOS |
Linux |
"window" ⭐ |
Exact project window |
Exact window and the session's Claude chat tab |
"app" |
Activate VS Code / terminal app |
Exact window, no tab switch |
"off" |
No click action |
No click action |
Add Selection to Claude Code
Select code, then use the chat icon in the editor title bar, the lightbulb action, the right-click menu, or Ctrl+Shift+I (Cmd+Shift+I on macOS). Right-click a file in the Explorer to add the whole file. The code is inserted as an @file#line reference.
Test
Command Palette → Vahid Code Claude Notify: Send Test Notification. On Linux, clicking it raises the current window.
License
MIT. Original work © 2025 tutuge; modifications © 2026 h.emamie.