[{"data":1,"prerenderedAt":55},["ShallowReactive",2],{"blog-claude-code-notifications":3,"blog-related-claude-code-notifications":36},{"slug":4,"title":5,"description":6,"category":7,"categoryId":8,"keyword":9,"date":10,"minutes":11,"body":12,"html":13,"headings":14},"claude-code-notifications","Claude Code notifications: know when it finishes or needs you","Get a sound or a desktop alert when Claude Code finishes or waits for you: the built-in setting, Notification and Stop hooks, and how to keep it quiet.","Workflows","workflows","claude code notifications","2026-11-25",6,"You give Claude Code a task, switch to your browser, and come back twenty minutes later. Either it finished nineteen minutes ago, or it stopped after ten seconds on a permission prompt and has been waiting for you ever since. Both cost you the same thing: time Claude could have spent working. The fix is a notification that fires on the two moments that matter, **it needs you** and **it's done**, and stays silent the rest of the time.\n\n## Does Claude Code send notifications on its own?\n\nYes, in some terminals. Claude Code has a setting, `preferredNotifChannel`, that decides how it alerts you. Its default, `\"auto\"`, picks the best channel your terminal supports:\n\n| Terminal | What you get with the default |\n| --- | --- |\n| Ghostty, Kitty, iTerm2 | A desktop notification (iTerm2 only once its alert settings are on) |\n| Apple Terminal | The terminal bell, which you hear only if \"Audible bell\" is on |\n| Warp, the VS Code terminal, others | Nothing |\n\nTo change it, set the key in `~\u002F.claude\u002Fsettings.json`:\n\n```json\n{\n  \"preferredNotifChannel\": \"terminal_bell\"\n}\n```\n\nThe values are `\"auto\"`, `\"terminal_bell\"`, `\"iterm2\"`, `\"kitty\"`, `\"ghostty\"` and `\"notifications_disabled\"`. In iTerm2, the desktop notification needs two switches: Settings › Profiles › Terminal, tick \"Notification Center Alerts\", then Filter Alerts and enable \"Send escape sequence-generated alerts\". In Apple Terminal, turn on \"Audible bell\" under Settings › Profiles › Advanced if you want the bell to make a sound.\n\n### How do you get notifications inside tmux or over SSH?\n\nBy default, tmux swallows them before they reach the terminal around it. Add this to `~\u002F.tmux.conf`, run `tmux source-file ~\u002F.tmux.conf`, and restart Claude Code:\n\n```text\nset -g allow-passthrough on\nset -g focus-events on\nset -s extended-keys on\nset -as terminal-features 'xterm*:extkeys'\n```\n\nOver SSH, outside tmux, keep `\"auto\"` on recent versions; on older ones, set the channel to your local terminal (`\"iterm2\"`, `\"kitty\"` or `\"ghostty\"`) on the machine that runs Claude Code.\n\nIf your terminal gets nothing, or you want more than one generic alert, use a hook.\n\n## Which hook should fire the notification?\n\n[Hooks](\u002Fblog\u002Fclaude-code-hooks) are commands Claude Code runs at fixed points. Three events cover notifications:\n\n| Event | Fires when | Use it for |\n| --- | --- | --- |\n| `Notification` | Claude Code sends a notification | \"It needs you\" |\n| `Stop` | Claude finishes responding | \"It's done\" |\n| `StopFailure` | A turn ends on an API error | \"It broke\" |\n\nThe `Notification` event carries a `notification_type`, and you can match on it. The two you'll use most:\n\n- **`permission_prompt`**: Claude needs you to approve a tool call, and the prompt has waited about six seconds.\n- **`idle_prompt`**: Claude finished about 60 seconds ago and you haven't typed since.\n\nOthers exist, for login, for questions an MCP server asks, and for the automatic continue after a usage limit; the [hooks reference](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fhooks) lists them. The hook receives JSON on stdin with `message` (the notification's text), an optional `title`, `notification_type`, and the usual `session_id`, `transcript_path` and `cwd`. A `Notification` hook can't block or change the notification. It runs even when `preferredNotifChannel` is `\"notifications_disabled\"`, which only turns off the built-in alert.\n\n`Stop` doesn't fire when you interrupt Claude yourself, and on an API error `StopFailure` fires instead, with an `error` field such as `rate_limit`, `authentication_failed` or `server_error`.\n\n## How do you set up a desktop notification on a Mac?\n\nThe shortest version, in `~\u002F.claude\u002Fsettings.json`:\n\n```json\n{\n  \"hooks\": {\n    \"Notification\": [\n      {\n        \"matcher\": \"\",\n        \"hooks\": [\n          {\n            \"type\": \"command\",\n            \"command\": \"osascript -e 'display notification \\\"Claude Code needs your attention\\\" with title \\\"Claude Code\\\"'\"\n          }\n        ]\n      }\n    ]\n  }\n}\n```\n\nAn empty matcher catches every notification type. On macOS, `osascript` notifications are shown as coming from Script Editor, so allow Script Editor in System Settings › Notifications the first time.\n\nA fixed text gets old once you run two sessions: you want to know *which* project is waiting and *why*. Save this as `~\u002F.claude\u002Fhooks\u002Fnotify.sh` and `chmod +x` it:\n\n```sh\n#!\u002Fbin\u002Fbash\n# Reads the hook's JSON and shows the project and Claude Code's own message.\ninput=$(cat)\nmsg=$(jq -r '.message \u002F\u002F \"Claude Code needs you\"' \u003C\u003C\u003C\"$input\")\nproject=$(basename \"$(jq -r '.cwd' \u003C\u003C\u003C\"$input\")\")\nosascript -e 'on run argv' \\\n  -e 'display notification (item 1 of argv) with title (item 2 of argv)' \\\n  -e 'end run' \"$msg\" \"Claude Code · $project\"\n```\n\nPassing the text as arguments (`argv`) instead of pasting it into the script means a quote in the message can't break it. Point the hook's `command` at `~\u002F.claude\u002Fhooks\u002Fnotify.sh`.\n\n### What about Linux and Windows?\n\nSame structure, different command. On Linux, `notify-send 'Claude Code' 'Claude Code needs your attention'`; it needs a notification daemon, and on Debian or Ubuntu the `libnotify-bin` package. On Windows, the docs' example uses PowerShell to open a message box, which is a dialog rather than a toast in the corner of the screen:\n\n```text\npowershell.exe -Command \"[System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms'); [System.Windows.Forms.MessageBox]::Show('Claude Code needs your attention', 'Claude Code')\"\n```\n\n## How do you get notified when Claude finishes?\n\nThe obvious answer is a `Stop` hook:\n\n```json\n{\n  \"hooks\": {\n    \"Stop\": [\n      {\n        \"hooks\": [\n          { \"type\": \"command\", \"command\": \"afplay \u002FSystem\u002FLibrary\u002FSounds\u002FGlass.aiff\", \"async\": true }\n        ]\n      }\n    ]\n  }\n}\n```\n\n`async: true` runs it in the background, so the sound never holds up the end of the turn. But `Stop` fires at the end of *every* turn, including the ones you watched happen. When you're working in the same window, that's a sound every thirty seconds.\n\nThe quieter option is `idle_prompt`. It fires only when Claude finished a minute ago *and you haven't typed since*, which is a good definition of \"it's done and you're not looking\". It skips turns where a background task is still running, and the wait for a usage-limit reset.\n\n## How do you avoid notification noise?\n\nNotifications you learn to ignore are worse than none. A few rules keep them useful:\n\n1. **Notify on waiting, not on working.** `permission_prompt` and `idle_prompt` are the two signals worth an interruption. Tool calls, subagent stops and every `Stop` are not.\n2. **Give each kind its own sound.** One for \"waiting\", one for \"done\", one for \"failed\". You learn them in a day and stop looking at the screen to know which it was:\n\n```json\n{\n  \"hooks\": {\n    \"Notification\": [\n      { \"matcher\": \"permission_prompt\", \"hooks\": [{ \"type\": \"command\", \"command\": \"afplay \u002FSystem\u002FLibrary\u002FSounds\u002FPing.aiff\" }] },\n      { \"matcher\": \"idle_prompt\", \"hooks\": [{ \"type\": \"command\", \"command\": \"afplay \u002FSystem\u002FLibrary\u002FSounds\u002FGlass.aiff\" }] }\n    ],\n    \"StopFailure\": [\n      { \"hooks\": [{ \"type\": \"command\", \"command\": \"afplay \u002FSystem\u002FLibrary\u002FSounds\u002FBasso.aiff\" }] }\n    ]\n  }\n}\n```\n\n3. **Say which project.** With several sessions, \"Claude needs you\" is useless; \"Claude Code · billing-api\" is not. The script above does it.\n4. **Ask less.** Most permission prompts are for things you always approve. Allow them with rules and the remaining prompts mean something. The [permission modes](\u002Fblog\u002Fclaude-code-permission-modes) article shows how.\n5. **Keep hooks fast.** A notification command should take milliseconds. Anything slower belongs in the background.\n\n## How do you test a notification hook?\n\nFeed it a sample payload by hand:\n\n```sh\necho '{\"message\":\"Claude needs your permission\",\"notification_type\":\"permission_prompt\",\"cwd\":\"\u002FUsers\u002Fada\u002Flarkspur-web\"}' \\\n  | ~\u002F.claude\u002Fhooks\u002Fnotify.sh\n```\n\nIf nothing shows, check that the script is executable, that `jq` is installed, and that the app sending the notification (Script Editor, your terminal) is allowed in your system's notification settings. Inside a session, `\u002Fhooks` lists every hook Claude Code loaded and the file each came from, so you can see whether yours is there at all.\n\n## In Relais\n\nRelais is built around this problem, without hooks to write. Every conversation in the sidebar shows its state: blue while it works, orange when it waits for you, red on an error. Each turn ends with a one-line status that says whether it needs you, so a turn that finished with nothing to ask stays out of your way. Everything that waits, across every project, is gathered in Needs you: ⌘J opens the next one, and queue mode (⇧⌘J) takes you through them one after another. Relais plays soft sounds of its own (two notes going up when a session is done, a double knock when it waits, a lower cue on an error) and sends a notification that opens the conversation when Relais isn't in front. Focus mode holds notifications back and gives them to you in one. Your Claude Code hooks still run, since these are real Claude Code sessions. See [Needs you](\u002Ffeatures\u002Fneeds-you), and [running several sessions at once](\u002Fblog\u002Frun-multiple-claude-code-sessions).","\u003Cp>You give Claude Code a task, switch to your browser, and come back twenty minutes later. Either it finished nineteen minutes ago, or it stopped after ten seconds on a permission prompt and has been waiting for you ever since. Both cost you the same thing: time Claude could have spent working. The fix is a notification that fires on the two moments that matter, \u003Cstrong>it needs you\u003C\u002Fstrong> and \u003Cstrong>it&#39;s done\u003C\u002Fstrong>, and stays silent the rest of the time.\u003C\u002Fp>\n\u003Ch2 id=\"does-claude-code-send-notifications-on-its-own\">\u003Ca class=\"anchor\" href=\"#does-claude-code-send-notifications-on-its-own\" aria-label=\"Link to this section\">#\u003C\u002Fa>Does Claude Code send notifications on its own?\u003C\u002Fh2>\n\u003Cp>Yes, in some terminals. Claude Code has a setting, \u003Ccode>preferredNotifChannel\u003C\u002Fcode>, that decides how it alerts you. Its default, \u003Ccode>&quot;auto&quot;\u003C\u002Fcode>, picks the best channel your terminal supports:\u003C\u002Fp>\n\u003Cdiv class=\"table-wrap\">\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>Terminal\u003C\u002Fth>\u003Cth>What you get with the default\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd>Ghostty, Kitty, iTerm2\u003C\u002Ftd>\u003Ctd>A desktop notification (iTerm2 only once its alert settings are on)\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Apple Terminal\u003C\u002Ftd>\u003Ctd>The terminal bell, which you hear only if &quot;Audible bell&quot; is on\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Warp, the VS Code terminal, others\u003C\u002Ftd>\u003Ctd>Nothing\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>To change it, set the key in \u003Ccode>~\u002F.claude\u002Fsettings.json\u003C\u002Fcode>:\u003C\u002Fp>\n\u003Cpre class=\"code\" data-lang=\"json\">\u003Ccode>{\n  \u003Cspan class=\"hljs-string\">\"preferredNotifChannel\"\u003C\u002Fspan>: \u003Cspan class=\"hljs-string\">\"terminal_bell\"\u003C\u002Fspan>\n}\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>The values are \u003Ccode>&quot;auto&quot;\u003C\u002Fcode>, \u003Ccode>&quot;terminal_bell&quot;\u003C\u002Fcode>, \u003Ccode>&quot;iterm2&quot;\u003C\u002Fcode>, \u003Ccode>&quot;kitty&quot;\u003C\u002Fcode>, \u003Ccode>&quot;ghostty&quot;\u003C\u002Fcode> and \u003Ccode>&quot;notifications_disabled&quot;\u003C\u002Fcode>. In iTerm2, the desktop notification needs two switches: Settings › Profiles › Terminal, tick &quot;Notification Center Alerts&quot;, then Filter Alerts and enable &quot;Send escape sequence-generated alerts&quot;. In Apple Terminal, turn on &quot;Audible bell&quot; under Settings › Profiles › Advanced if you want the bell to make a sound.\u003C\u002Fp>\n\u003Ch3 id=\"how-do-you-get-notifications-inside-tmux-or-over-ssh\">\u003Ca class=\"anchor\" href=\"#how-do-you-get-notifications-inside-tmux-or-over-ssh\" aria-label=\"Link to this section\">#\u003C\u002Fa>How do you get notifications inside tmux or over SSH?\u003C\u002Fh3>\n\u003Cp>By default, tmux swallows them before they reach the terminal around it. Add this to \u003Ccode>~\u002F.tmux.conf\u003C\u002Fcode>, run \u003Ccode>tmux source-file ~\u002F.tmux.conf\u003C\u002Fcode>, and restart Claude Code:\u003C\u002Fp>\n\u003Cpre class=\"code\" data-lang=\"text\">\u003Ccode>set -g allow-passthrough on\nset -g focus-events on\nset -s extended-keys on\nset -as terminal-features 'xterm*:extkeys'\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Over SSH, outside tmux, keep \u003Ccode>&quot;auto&quot;\u003C\u002Fcode> on recent versions; on older ones, set the channel to your local terminal (\u003Ccode>&quot;iterm2&quot;\u003C\u002Fcode>, \u003Ccode>&quot;kitty&quot;\u003C\u002Fcode> or \u003Ccode>&quot;ghostty&quot;\u003C\u002Fcode>) on the machine that runs Claude Code.\u003C\u002Fp>\n\u003Cp>If your terminal gets nothing, or you want more than one generic alert, use a hook.\u003C\u002Fp>\n\u003Ch2 id=\"which-hook-should-fire-the-notification\">\u003Ca class=\"anchor\" href=\"#which-hook-should-fire-the-notification\" aria-label=\"Link to this section\">#\u003C\u002Fa>Which hook should fire the notification?\u003C\u002Fh2>\n\u003Cp>\u003Ca href=\"\u002Fblog\u002Fclaude-code-hooks\">Hooks\u003C\u002Fa> are commands Claude Code runs at fixed points. Three events cover notifications:\u003C\u002Fp>\n\u003Cdiv class=\"table-wrap\">\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>Event\u003C\u002Fth>\u003Cth>Fires when\u003C\u002Fth>\u003Cth>Use it for\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd>\u003Ccode>Notification\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Claude Code sends a notification\u003C\u002Ftd>\u003Ctd>&quot;It needs you&quot;\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>Stop\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Claude finishes responding\u003C\u002Ftd>\u003Ctd>&quot;It&#39;s done&quot;\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>\u003Ccode>StopFailure\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>A turn ends on an API error\u003C\u002Ftd>\u003Ctd>&quot;It broke&quot;\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>The \u003Ccode>Notification\u003C\u002Fcode> event carries a \u003Ccode>notification_type\u003C\u002Fcode>, and you can match on it. The two you&#39;ll use most:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>\u003Ccode>permission_prompt\u003C\u002Fcode>\u003C\u002Fstrong>: Claude needs you to approve a tool call, and the prompt has waited about six seconds.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>\u003Ccode>idle_prompt\u003C\u002Fcode>\u003C\u002Fstrong>: Claude finished about 60 seconds ago and you haven&#39;t typed since.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>Others exist, for login, for questions an MCP server asks, and for the automatic continue after a usage limit; the \u003Ca href=\"https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fhooks\">hooks reference\u003C\u002Fa> lists them. The hook receives JSON on stdin with \u003Ccode>message\u003C\u002Fcode> (the notification&#39;s text), an optional \u003Ccode>title\u003C\u002Fcode>, \u003Ccode>notification_type\u003C\u002Fcode>, and the usual \u003Ccode>session_id\u003C\u002Fcode>, \u003Ccode>transcript_path\u003C\u002Fcode> and \u003Ccode>cwd\u003C\u002Fcode>. A \u003Ccode>Notification\u003C\u002Fcode> hook can&#39;t block or change the notification. It runs even when \u003Ccode>preferredNotifChannel\u003C\u002Fcode> is \u003Ccode>&quot;notifications_disabled&quot;\u003C\u002Fcode>, which only turns off the built-in alert.\u003C\u002Fp>\n\u003Cp>\u003Ccode>Stop\u003C\u002Fcode> doesn&#39;t fire when you interrupt Claude yourself, and on an API error \u003Ccode>StopFailure\u003C\u002Fcode> fires instead, with an \u003Ccode>error\u003C\u002Fcode> field such as \u003Ccode>rate_limit\u003C\u002Fcode>, \u003Ccode>authentication_failed\u003C\u002Fcode> or \u003Ccode>server_error\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Ch2 id=\"how-do-you-set-up-a-desktop-notification-on-a-mac\">\u003Ca class=\"anchor\" href=\"#how-do-you-set-up-a-desktop-notification-on-a-mac\" aria-label=\"Link to this section\">#\u003C\u002Fa>How do you set up a desktop notification on a Mac?\u003C\u002Fh2>\n\u003Cp>The shortest version, in \u003Ccode>~\u002F.claude\u002Fsettings.json\u003C\u002Fcode>:\u003C\u002Fp>\n\u003Cpre class=\"code\" data-lang=\"json\">\u003Ccode>{\n  \u003Cspan class=\"hljs-string\">\"hooks\"\u003C\u002Fspan>: {\n    \u003Cspan class=\"hljs-string\">\"Notification\"\u003C\u002Fspan>: [\n      {\n        \u003Cspan class=\"hljs-string\">\"matcher\"\u003C\u002Fspan>: \u003Cspan class=\"hljs-string\">\"\"\u003C\u002Fspan>,\n        \u003Cspan class=\"hljs-string\">\"hooks\"\u003C\u002Fspan>: [\n          {\n            \u003Cspan class=\"hljs-string\">\"type\"\u003C\u002Fspan>: \u003Cspan class=\"hljs-string\">\"command\"\u003C\u002Fspan>,\n            \u003Cspan class=\"hljs-string\">\"command\"\u003C\u002Fspan>: \u003Cspan class=\"hljs-string\">\"osascript -e 'display notification \\\"Claude Code needs your attention\\\" with title \\\"Claude Code\\\"'\"\u003C\u002Fspan>\n          }\n        ]\n      }\n    ]\n  }\n}\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>An empty matcher catches every notification type. On macOS, \u003Ccode>osascript\u003C\u002Fcode> notifications are shown as coming from Script Editor, so allow Script Editor in System Settings › Notifications the first time.\u003C\u002Fp>\n\u003Cp>A fixed text gets old once you run two sessions: you want to know \u003Cem>which\u003C\u002Fem> project is waiting and \u003Cem>why\u003C\u002Fem>. Save this as \u003Ccode>~\u002F.claude\u002Fhooks\u002Fnotify.sh\u003C\u002Fcode> and \u003Ccode>chmod +x\u003C\u002Fcode> it:\u003C\u002Fp>\n\u003Cpre class=\"code\" data-lang=\"sh\">\u003Ccode>#!\u002Fbin\u002Fbash\n# Reads the hook's JSON and shows the project and Claude Code's own message.\ninput=$(cat)\nmsg=$(jq -r '.message \u002F\u002F &quot;Claude Code needs you&quot;' &lt;&lt;&lt;&quot;$input&quot;)\nproject=$(basename &quot;$(jq -r '.cwd' &lt;&lt;&lt;&quot;$input&quot;)&quot;)\nosascript -e 'on run argv' \\\n  -e 'display notification (item 1 of argv) with title (item 2 of argv)' \\\n  -e 'end run' &quot;$msg&quot; &quot;Claude Code · $project&quot;\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Passing the text as arguments (\u003Ccode>argv\u003C\u002Fcode>) instead of pasting it into the script means a quote in the message can&#39;t break it. Point the hook&#39;s \u003Ccode>command\u003C\u002Fcode> at \u003Ccode>~\u002F.claude\u002Fhooks\u002Fnotify.sh\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Ch3 id=\"what-about-linux-and-windows\">\u003Ca class=\"anchor\" href=\"#what-about-linux-and-windows\" aria-label=\"Link to this section\">#\u003C\u002Fa>What about Linux and Windows?\u003C\u002Fh3>\n\u003Cp>Same structure, different command. On Linux, \u003Ccode>notify-send &#39;Claude Code&#39; &#39;Claude Code needs your attention&#39;\u003C\u002Fcode>; it needs a notification daemon, and on Debian or Ubuntu the \u003Ccode>libnotify-bin\u003C\u002Fcode> package. On Windows, the docs&#39; example uses PowerShell to open a message box, which is a dialog rather than a toast in the corner of the screen:\u003C\u002Fp>\n\u003Cpre class=\"code\" data-lang=\"text\">\u003Ccode>powershell.exe -Command &quot;[System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms'); [System.Windows.Forms.MessageBox]::Show('Claude Code needs your attention', 'Claude Code')&quot;\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch2 id=\"how-do-you-get-notified-when-claude-finishes\">\u003Ca class=\"anchor\" href=\"#how-do-you-get-notified-when-claude-finishes\" aria-label=\"Link to this section\">#\u003C\u002Fa>How do you get notified when Claude finishes?\u003C\u002Fh2>\n\u003Cp>The obvious answer is a \u003Ccode>Stop\u003C\u002Fcode> hook:\u003C\u002Fp>\n\u003Cpre class=\"code\" data-lang=\"json\">\u003Ccode>{\n  \u003Cspan class=\"hljs-string\">\"hooks\"\u003C\u002Fspan>: {\n    \u003Cspan class=\"hljs-string\">\"Stop\"\u003C\u002Fspan>: [\n      {\n        \u003Cspan class=\"hljs-string\">\"hooks\"\u003C\u002Fspan>: [\n          { \u003Cspan class=\"hljs-string\">\"type\"\u003C\u002Fspan>: \u003Cspan class=\"hljs-string\">\"command\"\u003C\u002Fspan>, \u003Cspan class=\"hljs-string\">\"command\"\u003C\u002Fspan>: \u003Cspan class=\"hljs-string\">\"afplay \u002FSystem\u002FLibrary\u002FSounds\u002FGlass.aiff\"\u003C\u002Fspan>, \u003Cspan class=\"hljs-string\">\"async\"\u003C\u002Fspan>: \u003Cspan class=\"hljs-keyword\">true\u003C\u002Fspan> }\n        ]\n      }\n    ]\n  }\n}\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>\u003Ccode>async: true\u003C\u002Fcode> runs it in the background, so the sound never holds up the end of the turn. But \u003Ccode>Stop\u003C\u002Fcode> fires at the end of \u003Cem>every\u003C\u002Fem> turn, including the ones you watched happen. When you&#39;re working in the same window, that&#39;s a sound every thirty seconds.\u003C\u002Fp>\n\u003Cp>The quieter option is \u003Ccode>idle_prompt\u003C\u002Fcode>. It fires only when Claude finished a minute ago \u003Cem>and you haven&#39;t typed since\u003C\u002Fem>, which is a good definition of &quot;it&#39;s done and you&#39;re not looking&quot;. It skips turns where a background task is still running, and the wait for a usage-limit reset.\u003C\u002Fp>\n\u003Ch2 id=\"how-do-you-avoid-notification-noise\">\u003Ca class=\"anchor\" href=\"#how-do-you-avoid-notification-noise\" aria-label=\"Link to this section\">#\u003C\u002Fa>How do you avoid notification noise?\u003C\u002Fh2>\n\u003Cp>Notifications you learn to ignore are worse than none. A few rules keep them useful:\u003C\u002Fp>\n\u003Col>\n\u003Cli>\u003Cstrong>Notify on waiting, not on working.\u003C\u002Fstrong> \u003Ccode>permission_prompt\u003C\u002Fcode> and \u003Ccode>idle_prompt\u003C\u002Fcode> are the two signals worth an interruption. Tool calls, subagent stops and every \u003Ccode>Stop\u003C\u002Fcode> are not.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Give each kind its own sound.\u003C\u002Fstrong> One for &quot;waiting&quot;, one for &quot;done&quot;, one for &quot;failed&quot;. You learn them in a day and stop looking at the screen to know which it was:\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cpre class=\"code\" data-lang=\"json\">\u003Ccode>{\n  \u003Cspan class=\"hljs-string\">\"hooks\"\u003C\u002Fspan>: {\n    \u003Cspan class=\"hljs-string\">\"Notification\"\u003C\u002Fspan>: [\n      { \u003Cspan class=\"hljs-string\">\"matcher\"\u003C\u002Fspan>: \u003Cspan class=\"hljs-string\">\"permission_prompt\"\u003C\u002Fspan>, \u003Cspan class=\"hljs-string\">\"hooks\"\u003C\u002Fspan>: [{ \u003Cspan class=\"hljs-string\">\"type\"\u003C\u002Fspan>: \u003Cspan class=\"hljs-string\">\"command\"\u003C\u002Fspan>, \u003Cspan class=\"hljs-string\">\"command\"\u003C\u002Fspan>: \u003Cspan class=\"hljs-string\">\"afplay \u002FSystem\u002FLibrary\u002FSounds\u002FPing.aiff\"\u003C\u002Fspan> }] },\n      { \u003Cspan class=\"hljs-string\">\"matcher\"\u003C\u002Fspan>: \u003Cspan class=\"hljs-string\">\"idle_prompt\"\u003C\u002Fspan>, \u003Cspan class=\"hljs-string\">\"hooks\"\u003C\u002Fspan>: [{ \u003Cspan class=\"hljs-string\">\"type\"\u003C\u002Fspan>: \u003Cspan class=\"hljs-string\">\"command\"\u003C\u002Fspan>, \u003Cspan class=\"hljs-string\">\"command\"\u003C\u002Fspan>: \u003Cspan class=\"hljs-string\">\"afplay \u002FSystem\u002FLibrary\u002FSounds\u002FGlass.aiff\"\u003C\u002Fspan> }] }\n    ],\n    \u003Cspan class=\"hljs-string\">\"StopFailure\"\u003C\u002Fspan>: [\n      { \u003Cspan class=\"hljs-string\">\"hooks\"\u003C\u002Fspan>: [{ \u003Cspan class=\"hljs-string\">\"type\"\u003C\u002Fspan>: \u003Cspan class=\"hljs-string\">\"command\"\u003C\u002Fspan>, \u003Cspan class=\"hljs-string\">\"command\"\u003C\u002Fspan>: \u003Cspan class=\"hljs-string\">\"afplay \u002FSystem\u002FLibrary\u002FSounds\u002FBasso.aiff\"\u003C\u002Fspan> }] }\n    ]\n  }\n}\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Col start=\"3\">\n\u003Cli>\u003Cstrong>Say which project.\u003C\u002Fstrong> With several sessions, &quot;Claude needs you&quot; is useless; &quot;Claude Code · billing-api&quot; is not. The script above does it.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Ask less.\u003C\u002Fstrong> Most permission prompts are for things you always approve. Allow them with rules and the remaining prompts mean something. The \u003Ca href=\"\u002Fblog\u002Fclaude-code-permission-modes\">permission modes\u003C\u002Fa> article shows how.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Keep hooks fast.\u003C\u002Fstrong> A notification command should take milliseconds. Anything slower belongs in the background.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Ch2 id=\"how-do-you-test-a-notification-hook\">\u003Ca class=\"anchor\" href=\"#how-do-you-test-a-notification-hook\" aria-label=\"Link to this section\">#\u003C\u002Fa>How do you test a notification hook?\u003C\u002Fh2>\n\u003Cp>Feed it a sample payload by hand:\u003C\u002Fp>\n\u003Cpre class=\"code\" data-lang=\"sh\">\u003Ccode>echo '{&quot;message&quot;:&quot;Claude needs your permission&quot;,&quot;notification_type&quot;:&quot;permission_prompt&quot;,&quot;cwd&quot;:&quot;\u002FUsers\u002Fada\u002Flarkspur-web&quot;}' \\\n  | ~\u002F.claude\u002Fhooks\u002Fnotify.sh\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>If nothing shows, check that the script is executable, that \u003Ccode>jq\u003C\u002Fcode> is installed, and that the app sending the notification (Script Editor, your terminal) is allowed in your system&#39;s notification settings. Inside a session, \u003Ccode>\u002Fhooks\u003C\u002Fcode> lists every hook Claude Code loaded and the file each came from, so you can see whether yours is there at all.\u003C\u002Fp>\n\u003Ch2 id=\"in-relais\">\u003Ca class=\"anchor\" href=\"#in-relais\" aria-label=\"Link to this section\">#\u003C\u002Fa>In Relais\u003C\u002Fh2>\n\u003Cp>Relais is built around this problem, without hooks to write. Every conversation in the sidebar shows its state: blue while it works, orange when it waits for you, red on an error. Each turn ends with a one-line status that says whether it needs you, so a turn that finished with nothing to ask stays out of your way. Everything that waits, across every project, is gathered in Needs you: ⌘J opens the next one, and queue mode (⇧⌘J) takes you through them one after another. Relais plays soft sounds of its own (two notes going up when a session is done, a double knock when it waits, a lower cue on an error) and sends a notification that opens the conversation when Relais isn&#39;t in front. Focus mode holds notifications back and gives them to you in one. Your Claude Code hooks still run, since these are real Claude Code sessions. See \u003Ca href=\"\u002Ffeatures\u002Fneeds-you\">Needs you\u003C\u002Fa>, and \u003Ca href=\"\u002Fblog\u002Frun-multiple-claude-code-sessions\">running several sessions at once\u003C\u002Fa>.\u003C\u002Fp>\n",[15,18,21,24,27,30,33],{"id":16,"text":17},"does-claude-code-send-notifications-on-its-own","Does Claude Code send notifications on its own?",{"id":19,"text":20},"which-hook-should-fire-the-notification","Which hook should fire the notification?",{"id":22,"text":23},"how-do-you-set-up-a-desktop-notification-on-a-mac","How do you set up a desktop notification on a Mac?",{"id":25,"text":26},"how-do-you-get-notified-when-claude-finishes","How do you get notified when Claude finishes?",{"id":28,"text":29},"how-do-you-avoid-notification-noise","How do you avoid notification noise?",{"id":31,"text":32},"how-do-you-test-a-notification-hook","How do you test a notification hook?",{"id":34,"text":35},"in-relais","In Relais",[37,43,48],{"slug":38,"title":39,"description":40,"category":7,"categoryId":8,"keyword":41,"date":10,"minutes":42},"claude-code-workflow-automation","Claude Code workflow automation: from one prompt to a pipeline","How to automate repeated work with Claude Code, rung by rung: CLAUDE.md, skills, hooks, headless scripts, CI, and multi-step workflows that stop where a person has to decide.","claude code workflow automation",7,{"slug":44,"title":45,"description":46,"category":7,"categoryId":8,"keyword":47,"date":10,"minutes":11},"semantic-code-search","Semantic code search: find code by what it does, not what it's called","How semantic code search works (passages, embeddings, nearest neighbours), when it beats grep and when it doesn't, why it can run on your laptop, and how it saves an AI agent from reading the wrong files.","semantic code search",{"slug":49,"title":50,"description":51,"category":7,"categoryId":8,"keyword":52,"date":53,"minutes":54},"claude-code-multi-repo-projects","Claude Code across several repositories: --add-dir and layouts","How to work with Claude Code on a project split across repos: launch from a parent folder, --add-dir, what config loads from extra folders, and commits.","claude code multiple repositories","2026-11-17",5,1795902782801]