Feature: Sound notifications

Resolved 💬 26 comments Opened May 24, 2025 by Heilemann Closed Aug 22, 2025

Windsurf has a feature you can enable to have it play a ding sound when it's done thinking and it's the user's turn. This is great, especially if it's easy to turn on and off, and even more so now that Opus allows for very long turns (I'm currently 1091 seconds into a run right now), so I know when to turn my attention back to it.

View original on GitHub ↗

26 Comments

mehdifanai · 1 year ago

the same for VScode. terminal in vscode not playing a sound when Claude Code done with something despite me turning alert sounds on. it works in regular (non-vscode terminal though).

!Image

SKALO-SE · 1 year ago

For me it does not work either in vscode or in native MacOS terminal.
Tried both "auto", "terminal_bell" and even
claude config set --global preferredNotifChannel "\a"
claude config set --global preferredNotifChannel "afplay /System/Library/Sounds/Ping.aiff"

onjas-6 · 1 year ago

yeah and plz also support email / text notification if possible

arrrggghhh · 1 year ago

Could we add an option to execute a user-defined script when a task completes or needs confirmation? This would let developers create personalized notifications (e.g., email, SMS).

Currently, relying solely on terminal alerts presents challenges. They can be cumbersome to configure, sometimes don't work reliably, and can also be disruptive. For instance, if a user customizes the alert sound to be louder, it might trigger frequently for minor errors (like typos), causing unnecessary noise.

Script execution would offer greater flexibility, bypassing these limitations and giving users better control over their notification preferences.

smythp · 1 year ago

I'd like to second @arrrggghhh's proposal here, running a bash command or similar would be much more flexible.

Datamine · 1 year ago

Second this, the bell feature isn't working for me on Kubuntu 24's native terminal, when e.g. printf '\a' makes a bell sound just fine.

SKALO-SE · 1 year ago

I got it working in MacOS and vscode.
vscode:
"accessibility.signals.terminalBell": {
"sound": "on"
"terminal.integrated.enableVisualBell": true

Claude Code config set to terminal_bell

km-tr · 1 year ago

I managed to get it working using @SKALO-SE's method. Thank you so much!
However, I can't forget the exciting notification sound from RooCode.
I'd be really happy if more fun sounds could be implemented in the future.

MartinKavik · 1 year ago
dwymark-celestron · 1 year ago

terminal_bell setting does not ever cause a notification to be emitted even though running echo -e "\a" from bash mode within claude code in same context works fine.

anose001 · 1 year ago

Running echo -e "\a" in WSL2 on Windows works. After launching claude in the same window it does not anymore. Is a fix planned?

McGowanC · 1 year ago

Would love to be able to customize the sound, any idea on how to do that?

PastaPastaPasta · 1 year ago

Does anyone here know if we can use this notification channel to call an mcp tool? Ideally, I'd like to setup such that when a task is complete, a slack message is sent, via mcp.

smythp · 1 year ago

If they introduced the "run arbitrary commad" concept, you could do this. As it stands, no.

lcarrasco · 1 year ago

@PastaPastaPasta you can do it instructing Claude in CLAUDE.md to perform a command ALWAYS after it finishes however this will burn some ammount of tokens.

zazer0 · 1 year ago

This would really improve my workflow if possible to fix!

  • On WezTerm, claude-code@v1.0.40
  • Manual echo -e "\a" triggers a bell sound
  • Setting claude config set --global preferredNotifChannel terminal_bell doesn't trigger on Claude complete
  • (FWIW, setting the terminal_bell option in the /config UI doesn't fix it either)
kylemh · 1 year ago

Sounds like this ticket can be closed because you can handle it with hooks, no? https://docs.anthropic.com/en/docs/claude-code/hooks#notification-2

smythp · 1 year ago

I think there should still be a feature here and they can use hooks under the hood? Plus none of the included options work (or only flakily in specific circumstances). If they want to rip out this feature entirely, then fine, close the issue, but that work hasn't been done.

alex-orlovskyi · 1 year ago

+1 towards solving this with hooks.
Currently experimenting with:

"Stop": [
  {
    "matcher": "",
    "hooks": [
      {
        "type": "command",
        "command": "afplay /System/Library/Sounds/Glass.aiff"
      }
    ]
  }
],
"Notification": [
  {
    "matcher": "",
    "hooks": [
      {
        "type": "command",
        "command": "afplay /System/Library/Sounds/Submarine.aiff"
      }
    ]
  }
]
clouedoc · 1 year ago

Here is how I got it working.

First step: deciding on a notification command

First, you need to know the command you want to run in order to receive a notification.

It could be a cURL request to ntfy.sh, or a command that shows a notification on your laptop.

For my use case, I decided to show a notification on my laptop.

Here is my command:

notify-send --app-name="Claude Code" --icon /home/clouedoc/Pictures/claude.png --urgency normal "Claude Code" "Needs your attention"

Do note that notify-send is specific to Linux (as far as I know).

I downloaded an icon of Claude to illustrate my notification :-)

Second step: setting up the hooks

  1. Open Claude code
  2. Type /hooks
  3. Add a hook on the "Stop" hook, set the command that you picked (or copy mine above). Same with the "Notification" hook. Save them as user configuration
  4. Done!

Here is how it looks on my system (with Mako as a notification daemon):

<img width="622" height="178" alt="Image" src="https://github.com/user-attachments/assets/e64e40a3-b072-4adf-b0d2-724fb0faa19e" />

alex-orlovskyi · 1 year ago

Just created similar workaround to @clouedoc with https://github.com/julienXX/terminal-notifier

    "Stop": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "terminal-notifier -group 'PROJECT_NAME' -title 'Claude Code Stopped' -subtitle \"Event: $CLAUDE_EVENT_TYPE\" -message \"Last tool: ${CLAUDE_TOOL_NAME:-N/A} | Files: $(echo \"$CLAUDE_FILE_PATHS\" | wc -w | tr -d ' ')\" -sound Glass"
          }
        ]
      }
    ]

Appears on mac like this:

<img width="339" alt="Image" src="https://github.com/user-attachments/assets/4090acbd-33f3-4896-8b33-d7b633df61e7" />

felixzieger · 12 months ago

Thanks for the hint with terminal-notifier, @clouedoc!

I use this for managing the hook via nix + home-manager:

".claude/settings.json".text = builtins.toJSON {
  hooks = {
    Stop = [
      {
        matcher = ".*";
        hooks = [
          {
            type = "command";
            command = ''${pkgs.terminal-notifier}/bin/terminal-notifier -title "Claude Code" -message "Task completed""'';
          }
        ];
      }
    ];
  };
};
jasonswearingen · 11 months ago

the bell notification is working for me using WSL devcontainers. You need to adjust the vscode settings, add the claude notification bell setting, and then you need to NOT be focused on the claude code window when it completes.

vscode settings:

"terminal.integrated.enableVisualBell": true,
  "accessibility.signals.terminalBell": {
    "sound": "on",
    "announcement": "auto",
  },

Edit: at the same time I did the above, I also added a Stop hook .py script that (attempts) to output the user's latest prompts. So if just changing the above settings doesn't work, maybe also add a hook.

ghost · 10 months ago

Thank you for the suggestion! You can either use preferredNotifChannel (https://docs.anthropic.com/en/docs/claude-code/settings) or hooks (https://docs.anthropic.com/en/docs/claude-code/hooks) to set up sound notifications

danieltty · 10 months ago

guys, which hook is for the decision box that asks user to choose whether to accept edit or reject? the accessibility sound terminal bell is delayed about 3 seconds after the box appears, which is not ideal.
I tried pretooluse and notification hooks, but they are not working,

github-actions[bot] · 10 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.