anotifier / vscode
VS Code logo

Agent notifications, in VS Code.

Agents running inside your editor are the easiest to forget — the terminal panel is hidden and the agent works in silence. anotifier surfaces every finish and every question as a real notification, and on Windows a click on the toast brings the project's window forward.

$ npx anotifier@latest setup
[ HOW IT HOOKS IN ]

Wired into VS Code itself.

anotifier's hooks fire no matter where the agent runs: a standalone terminal, the VS Code integrated terminal, or an editor's agent panel.

Claude Code in VS CodeStop & Notification hooksThe same hooks fire in the VS Code extension and in the integrated terminal.
CursorAgent stop hookCursor is a VS Code fork with its own hook file. Its alert is titled Cursor and says Task complete.
Codex CLI · Gemini CLITheir own hooksRun either in the integrated terminal and its hooks fire as they do anywhere else.
[ WHAT SETUP WRITES ]

No extension: setup edits each agent's own hook file.

VS Code never sees anotifier. npx anotifier@latest setup looks in your home folder for the agents you have installed and adds an anotifier entry to the hook file each one already reads. Nothing is installed into VS Code and nothing is added to its settings.

AgentSetup wires it whenFile it editsEvents
Claude Code~/.claude/settings.json exists~/.claude/settings.jsonStop, Notification
Cursor~/.cursor exists~/.cursor/hooks.jsonstop
Codex CLI~/.codex exists~/.codex/hooks.json, plus trust in config.tomlStop, PermissionRequest, SessionStart
Gemini CLI~/.gemini exists and isn't only Antigravity's~/.gemini/settings.jsonAfterAgent, Notification

Open each agent once before you run setup, so its folder exists. Setup copies every file it changes to ~/.anotifier/backups/ first, and npx anotifier@latest uninstall removes only the entries it added.

[ WHAT YOU GET ]

What each alert says.

The title is the project and the agent, such as my-app · Claude Code. The project is the name of the folder the agent was started in, so two VS Code windows on different folders read differently at a glance. For Claude Code the body is the start of Claude's last reply, up to 180 characters, or its own message when it needs you; phone push says my-app: Task complete instead. Codex CLI and Gemini CLI send my-app: Task complete or my-app: Needs your input. anotifier doesn't read a project folder from Cursor's event, so its alert is just Cursor and Task complete.

Every alert goes to each channel you have on: the desktop toast, phone push through ntfy, a Slack, Discord or Telegram webhook, and the terminal bell. Only Claude Code can quote its reply; the other agents always send the generic line.

[ CLICK TO FOCUS ]

On Windows, a click brings the right window forward.

The first Windows toast registers an agentfocus:// link handler in your user registry hive, and each toast carries one. A click opens it and a small script looks for a window to raise, in this order:

  1. A terminal window whose title contains the project folder name: Windows Terminal, PowerShell, cmd, Warp, WezTerm, Alacritty, Hyper, ConEmu or tmux.
  2. A window titled Visual Studio Code that contains the folder name. VS Code puts the open folder in its window title, which is why this works.
  3. A window titled Cursor that contains the folder name.
  4. Any other window whose title contains the folder name.
  5. If none match, the nearest window owned by a parent process of the hook, looked up when the toast fired.

Cursor alerts carry no folder for anotifier, so their toasts have no click action at all, and neither do macOS, Linux and WSL toasts. To turn it off on Windows, set toast.clickToFocus to false in ~/.anotifier/config.json.

[ IF NOTHING ARRIVES ]

Checks when an agent in VS Code stays quiet.

What you seeLikely causeWhat to do
No alert from any agentThe agent's folder didn't exist when setup ran, so its hooks were never written.Run npx anotifier@latest status. It lists each tool as wired or not installed. Start the agent once, then run setup again.
test works but the agent is silentThe hook is running into an error.status prints recent hook errors from ~/.anotifier/errors.log.
No toast on WindowsToasts need PowerShell 7 (pwsh) and the BurntToast module.Setup checks both. If pwsh is missing, run winget install --id Microsoft.PowerShell --source winget, then setup again.
Clicking the toast does nothing usefulNo window title contains the project folder, or the alert is from Cursor (anotifier gets no project folder for it), macOS, Linux or WSL.Open the folder itself in VS Code so its name appears in the title. See the order above.

The notifications not working guide walks through every channel in the same way.

[ CHANNELS ]

Every channel you'd actually use.

[+] Desktop toasts macOS, Windows, Linux + WSL routing.
[+] Phone push Android & iOS via ntfy — no account.
[+] Webhooks Slack, Discord, Telegram, any HTTP endpoint.
[+] Terminal bell A ding in the terminal the agent runs in.
[+] Click-to-focus On Windows, a click on the toast brings the project's window forward.
[+] Zero npm dependencies Plain Node.js 18+, one shared config.
[ CHECK IT, UNDO IT ]

Test it, then keep it or remove it.

npx anotifier@latest test       # fire a test alert on every channel
npx anotifier@latest status     # show which agents and channels are set up
npx anotifier@latest doctor     # diagnose a channel that stays quiet
npx anotifier@latest uninstall  # remove the hooks setup added

test sends straight to your channels without going through VS Code, so it proves the channels work. uninstall removes only the entries anotifier added and restores your statusline (1.5.0 and later), and setup keeps a copy of every file it changes in ~/.anotifier/backups/.

[ FAQ ]

VS Code questions, answered.

Do I need to install a VS Code extension?

No. anotifier hooks the agents themselves, so it works regardless of which editor hosts them — nothing is added to VS Code.

What is click-to-focus?

On Windows, clicking a toast brings forward the window whose title contains the project folder, preferring a terminal, then VS Code, then Cursor. anotifier gets no project folder for Cursor alerts, so they can't do it, and macOS, Linux and WSL toasts have no click action.

Which agents does it cover inside VS Code?

Claude Code in the VS Code extension or the integrated terminal, Cursor's agent, and Codex CLI or Gemini CLI when you run them in the integrated terminal.

Will I hear the terminal bell in VS Code?

Not always. VS Code can swallow the terminal bell; run anotifier doctor in its terminal and it warns you about that. The toast and phone push don't depend on the bell.

How do I get a notification when Claude Code finishes in VS Code?

Open Claude Code once, then run npx anotifier@latest setup. It adds Stop and Notification hooks to ~/.claude/settings.json, and they fire for the VS Code extension and the integrated terminal alike. Run npx anotifier@latest test to see a sample alert.

Does it work with GitHub Copilot's agent mode in VS Code?

No. anotifier only registers hooks for Claude Code, Codex CLI, Cursor, Gemini CLI and Antigravity CLI. It writes nothing for Copilot, so Copilot's agent finishes without an alert.

Does it work over Remote-SSH, WSL or a dev container?

The hook runs on the machine where the agent runs. When anotifier runs inside WSL, toasts go out through Windows PowerShell; the Windows and WSL guide covers the setup. Over Remote-SSH or in a dev container the toast would appear on the remote machine, so use phone push or a Discord or Slack webhook there.

[ GUIDES ]

Every option, explained.

[ ALSO WORKS WITH ]

One config, every agent.

Every command and config key is in the docs.

Full feature tour, demo video, and install options on the anotifier home page.