<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Marlon Barcarol</title>
    <description>The latest articles on DEV Community by Marlon Barcarol (@marlol).</description>
    <link>https://dev.to/marlol</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F559951%2F965fba5b-c975-407f-9e04-519cf91cc563.jpg</url>
      <title>DEV Community: Marlon Barcarol</title>
      <link>https://dev.to/marlol</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/marlol"/>
    <language>en</language>
    <item>
      <title>Making Claude Code beep when it needs you</title>
      <dc:creator>Marlon Barcarol</dc:creator>
      <pubDate>Wed, 28 Oct 2026 14:14:41 +0000</pubDate>
      <link>https://dev.to/marlol/making-claude-code-notify-when-it-needs-you-2eah</link>
      <guid>https://dev.to/marlol/making-claude-code-notify-when-it-needs-you-2eah</guid>
      <description>&lt;p&gt;While Claude Code works, I switch to other things. Too often I came back to find it had finished long ago, or had been sitting on a permission prompt for ten minutes waiting for a yes.&lt;/p&gt;

&lt;p&gt;I wanted two sounds:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A gentle one when Claude finishes a reply.&lt;/li&gt;
&lt;li&gt;A different one when Claude needs me.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This setup is for macOS.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to do it
&lt;/h2&gt;

&lt;p&gt;Add this to &lt;code&gt;~/.claude/settings.json&lt;/code&gt;. That's the user-level file, so it applies to every project. If the file already has settings, merge the &lt;code&gt;hooks&lt;/code&gt; key in rather than replacing the file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"Notification"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"matcher"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"permission_prompt|idle_prompt|elicitation_dialog"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"afplay -v 0.05 /System/Library/Sounds/Hero.aiff 2&amp;gt;/dev/null || true"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"async"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"Stop"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"afplay -v 0.05 /System/Library/Sounds/Blow.aiff 2&amp;gt;/dev/null || true"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"async"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. Claude Code picks up the change without a restart.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;Stop&lt;/code&gt;&lt;/strong&gt; runs every time Claude finishes a reply. It plays the Blow sound.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;Notification&lt;/code&gt;&lt;/strong&gt; runs when Claude needs you, and plays the Hero sound. The matcher limits it to three cases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;permission_prompt&lt;/code&gt;: Claude is waiting for you to approve a tool, and the prompt has waited about six seconds.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;idle_prompt&lt;/code&gt;: Claude finished about 60 seconds ago and you haven't typed since.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;elicitation_dialog&lt;/code&gt;: Claude is asking you a question.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;afplay&lt;/code&gt;&lt;/strong&gt; is the command-line audio player built into macOS. &lt;code&gt;-v&lt;/code&gt; sets the volume from 0 to 1. The built-in sounds live in &lt;code&gt;/System/Library/Sounds/&lt;/code&gt;, so you can swap Blow and Hero for Glass, Tink, Pop, Purr and others.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;"async": true&lt;/code&gt;&lt;/strong&gt; plays the sound in the background, so it never slows Claude down. &lt;strong&gt;&lt;code&gt;2&amp;gt;/dev/null || true&lt;/code&gt;&lt;/strong&gt; stops a failed sound from showing up as a hook error.&lt;/p&gt;

&lt;h2&gt;
  
  
  Gotchas
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The sounds are loud.&lt;/strong&gt; I started at 0.4 and ended up at 0.05.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The idle sound waits about a minute.&lt;/strong&gt; It only plays if you haven't typed since Claude finished. Typing in the terminal resets the timer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;In auto mode, you'll get few permission prompts.&lt;/strong&gt; Most of your Hero sounds will come from the idle timer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test a sound on its own&lt;/strong&gt; with &lt;code&gt;afplay -v 0.05 /System/Library/Sounds/Hero.aiff&lt;/code&gt;, before putting it in a hook.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use &lt;code&gt;/hooks&lt;/code&gt; in Claude Code&lt;/strong&gt; to review your hooks or turn one off.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  To explore further
&lt;/h2&gt;

&lt;p&gt;To get notified on your phone too, add a command to the &lt;code&gt;Notification&lt;/code&gt; hook that sends a push through a service like &lt;a href="https://ntfy.sh" rel="noopener noreferrer"&gt;ntfy&lt;/a&gt;, &lt;a href="https://pushover.net" rel="noopener noreferrer"&gt;Pushover&lt;/a&gt; or a Telegram bot.&lt;/p&gt;

</description>
      <category>claudecode</category>
      <category>macos</category>
      <category>productivity</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
