IDE terminals in VS Code, Cursor and JetBrains get no desktop notification from Claude Code by default, because Claude Code only sends one to iTerm2, Ghostty and Kitty. To get alerted, either set "preferredNotifChannel": "terminal_bell" and let the IDE handle the bell, or add a Notification hook to ~/.claude/settings.json that shows a desktop notification or sends a push. Hooks fire in the integrated terminal and in the VS Code extension's chat panel alike, because both read the same settings file.
01Why the IDE stays quiet
Claude Code's built-in alert depends on the terminal it runs in. With the default setting it raises a desktop notification only in iTerm2, Ghostty and Kitty, and Anthropic's terminal documentation names the VS Code integrated terminal as one that receives none. JetBrains terminals are in the same position. The terminal bell guide explains every value of preferredNotifChannel.
There are two ways to run Claude Code in VS Code and Cursor, and the difference matters:
claude in the integrated terminal~/.claude/settings.json~/.claude/settings.json (the same file)JetBrains IDEs (IntelliJ IDEA, PyCharm, WebStorm, GoLand, Android Studio and others) work like the right-hand column: the Claude Code plugin runs claude in the IDE's integrated terminal and connects to it.
02Option 1: the terminal bell
For claude running in an integrated terminal, add this to ~/.claude/settings.json:
{
"preferredNotifChannel": "terminal_bell"
}
Claude Code then rings the bell character when it needs you. What happens next is up to the IDE. VS Code and Cursor handle the terminal bell through their accessibility signal settings; search Settings for "terminal bell" to choose a sound. In JetBrains IDEs, check the terminal settings for your IDE version. A bell is easy to miss with headphones off or the IDE in the background, so most people go on to option 2.
03Option 2: a Notification hook
A hook runs a command of your choice and works in every IDE, in the terminal and the VS Code chat panel. This one shows a desktop notification on macOS:
{
"hooks": {
"Notification": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "osascript -e 'display notification \"Claude Code needs your attention\" with title \"Claude Code\"'"
}
]
}
]
}
}
On Linux use notify-send 'Claude Code' 'Claude Code needs your attention', and on Windows a PowerShell command; the Linux guide and the Windows guide have tested versions. If osascript shows nothing on macOS, open System Settings > Notifications and allow notifications for Script Editor, which is the app osascript notifications come from.
In the VS Code extension you can review hooks without opening the file: open the Customize section and select Hooks to see the hooks loaded in the session, grouped by event (Claude Code v2.1.269 or later).
To be told the moment Claude finishes, rather than when it is waiting, add a Stop hook as well. The guide to getting notified when Claude finishes shows both together.
Timing differs in the VS Code extension
In a terminal, the permission_prompt notification waits until the prompt has gone about six seconds without a keystroke, and every key you press pushes it back. In the VS Code extension (and Claude Desktop), Anthropic's documentation says it fires about six seconds after Claude asks, without deferring while you type, and does not fire at all if you answer sooner. If that is noisy while you are working in the panel, set the environment variable CLAUDE_CODE_DISABLE_PERMISSION_PROMPT_NOTIFY_HOOKS=1 to turn it off there. The Notification hook guide lists every notification type and when it fires.
04Remote windows: SSH, WSL, dev containers and JetBrains Remote Development
This is where IDE notifications most often go wrong. When a VS Code or Cursor window is connected to an SSH host, WSL or a dev container, Claude Code runs on that system and reads ~/.claude/settings.json there, not on your laptop. Your hooks run there too. A desktop command such as osascript or notify-send then has no desktop to show on, and fails quietly.
JetBrains Remote Development is similar: the Claude Code plugin must be installed on the remote host, and Claude Code runs there.
What works instead:
- WSL on Windows: a hook can call
powershell.exethrough Windows interop, as long as it is on thePATHinside WSL. - SSH hosts and containers: send the alert over the network to something that reaches you, such as ntfy or a Telegram, Slack or Discord webhook. The SSH guide covers the options.
05Use an external terminal with /ide
If you want the built-in desktop notification, run Claude Code in iTerm2, Ghostty or Kitty and connect it to the IDE with the /ide command. Diff viewing and selection sharing still work through the IDE, and the alerts come from the external terminal. In iTerm2 you need to enable its alert settings first, as described in the terminal bell guide.
06Other things worth knowing
- Shift+Enter: in VS Code and Cursor, run
/terminal-setuponce so Shift+Enter inserts a newline. In JetBrains terminals it is not available; use Ctrl+J, or\then Enter. - Remote Control: Anthropic's Remote Control can be started from the VS Code extension with
/remote-control, which lets you follow the session in the Claude mobile app. It has its own plan and sign-in requirements; see the comparison. - Several windows: if you run Claude Code in more than one IDE window, put the project folder in the alert so you know which one needs you. The hook's input includes
cwd. See running several sessions.
07Where Claude Code Notifier fits
A Notification hook with your platform's notifier is a good, free answer if you are sitting at the IDE. It does not help when you are away from the screen, and it does not let you answer.
Claude Code Notifier's ccn is a hook too, so it works in IDE terminals the same way it works in any other terminal, on Mac, Windows and Linux. Installed on its own, it shows a desktop notification when Claude finishes, needs a permission or asks a question. With a phone paired, you can allow once, allow for the session or deny a permission request, pick an answer to Claude's question, and send the next instruction from the phone. If you typed in the last 30 seconds the terminal asks as usual and nothing waits on the phone. Phone pushes go through a relay rather than the local desktop, so if you install ccn on the remote machine your IDE window is connected to, the phone still hears from it. Claude Code Notifier is independent and not made by Anthropic. See the ccn page and pairing a phone.
08FAQ
Why does Claude Code not notify me in VS Code?
The VS Code integrated terminal does not receive Claude Code's built-in desktop notification. Set "preferredNotifChannel": "terminal_bell" or add a Notification hook in ~/.claude/settings.json, then start a new session.
Do hooks work in the Claude Code VS Code extension?
Yes. Claude Code fires the same hook events in IDE extensions as in the terminal, and the extension and the CLI share ~/.claude/settings.json. The extension's Customize section can show and edit the hooks.
Does this work in Cursor?
Yes. Cursor can install the same Claude Code extension, and claude runs in its integrated terminal like in VS Code. Everything above applies.
My hook works locally but not in a Remote SSH window. Why?
In a remote window, Claude Code and its hooks run on the remote machine, which has no desktop. Edit ~/.claude/settings.json on that machine and use a network push such as ntfy instead of a desktop command.