# Receive notifications for designated coding agent events

**Author:** Cooper Veysey  
**Published:** 2025-10-27 12:00:00+00  
**Category:** Agents

## Introduction

Last week I shared some reflections from my first few weeks using agentic coding tools [(link)](/blogs/agentic-systems-first-impressions?utm_source=coding_agent_notifications&utm_medium=blog_link). Today I am going to share some details about a problem that I encountered repeatedly while using these tools, as well as a solution that I built to address that problem.

## What prompted the creation of this tool?

You assign a coding agent a long-running task and switch to Slack to answer some messages. You start and finish a huddle and eventually return to your IDE to find that the coding agent has been sitting idle for several minutes, because it requires your direction on a task or authorization to use a tool. If you had known that the agent required your input, then you would have provided the required input quickly and had the agent back to work several minutes prior. Instead material time and output have been lost to unnecessary latency.

When Claude Code requires input from a human, by default that is communicated exclusively via Claude Code outputting a message to the terminal. It is not otherwise announced that Claude Code requires feedback in order to continue its work. No sound plays, no visual notification displays outside of what is displayed via the terminal.

That means that if a human is not actively monitoring their terminal, there is a delta between when an agent requires feedback and when a human becomes aware of that. Repeated dozens of times across a workday, the cumulative cost of these idle intervals adds up. A few minutes here and there compounds into hours of idle agent time, which can prove extremely expensive as measured by throughput.

This was happening to me often enough that I was compelled to explore how other folks had accounted for this. The consequences felt significant enough that I was sure that a quality solution to the problem must exist already. I was excited to find and start benefitting from that solution.

I validated that I was not the only person to experience this problem, for example [this Reddit thread](https://www.reddit.com/r/ClaudeAI/comments/1ll8f3d/can_claude_code_play_a_sound_when_it_requires_an/) is dedicated to the problem and features comments like:

> Sometimes (Claude Code) works for a couple of minutes and I don't want to stare at the screen waiting for it to (stop) inevitably and ask me something to approve etc. Is there a way to play a sound when it requires my attention?

> Getting a sound alert when Claude Code needs your approval would totally keep you from staring at the screen all day waiting for the next prompt.

I learned that several coding agent alert solutions exist, but none were exactly what I was looking for. Some require manual JSON editing. Others offer audio alerts but not visual notifications, which is not viable for folks like myself that are frequently on calls and often need to silence their audio notifications. So I decided to build what I was looking for.

## What does the tool do?

- Our tool helps ensure that you are alerted as early as possible whenever a coding agent might benefit from your input. It does this via customizable audio and visual notifications that are triggered by different coding agent events.
- Our tool frees you from having to actively monitor whether or not a coding agent requires your input.

## How does it work?

Our solution takes advantage of Claude Code hooks to deliver notifications when designated events occur. Anthropic defines these hooks as "user-defined shell commands that execute at various points in Claude Code's lifecycle. Hooks provide deterministic control over Claude Code's behavior, ensuring certain actions always happen rather than relying on the LLM to choose to run them" ([source](https://docs.claude.com/en/docs/claude-code/hooks-guide)).

**Hook events that our solution currently accounts for**

- [Notification](https://docs.claude.com/en/docs/claude-code/hooks-guide#hook-events-overview) – Runs when Claude Code sends notifications.
- [Stop](https://docs.claude.com/en/docs/claude-code/hooks-guide#hook-events-overview) – Runs when Claude Code finishes responding.
- [PreToolUse](https://docs.claude.com/en/docs/claude-code/hooks-guide#hook-events-overview) – Runs before tool calls (permission prompts).
- [PostToolUse](https://docs.claude.com/en/docs/claude-code/hooks-guide#hook-events-overview) – Runs after tool calls complete.
- [SubagentStop](https://docs.claude.com/en/docs/claude-code/hooks-guide#hook-events-overview) – Runs when subagent tasks complete.

**Some details on what happens when our app is installed**

Script files are added to ~/.claude/scripts/:

- smart-notify.sh — Parses hook event metadata, invokes afplay for audio playback and
  terminal-notifier for macOS notifications.
- select-sound.sh — Determines which audio file to play based on event type and project.
- read-config.sh — Loads notification preferences from audio-notifier.yaml, and exports
  them as shell environment variables.
- audio-notifier-uninstall.sh — Removes hooks from settings.json, deletes installed
  files, creates a timestamped settings.json backup.

The below files are added to ~/.claude/:

- audio-notifier.yaml — Configuration file storing event-specific notification settings,
  audio file paths, and Focus mode behavior.
- .sounds-enabled — Flag file checked by smart-notify.sh to enable/disable notifications.
- voices/global/\*.mp3 — Pre-generated audio files for default notification sounds.
- terminal-notifier.app — macOS utility for delivering native system notifications via
  NSUserNotificationCenter.

## Customization options

We created a <a href="https://v2.tauri.app/" target="_blank" class="inline-link">Tauri</a> app to make it as easy as possible for users to customize their coding agent notifications experience. Via our GUI:

- Visual notifications can be turned on and off on a per event basis.
- Audio alerts can be turned on and off on a per event basis.
- You can arrange for different audio to play on a per event basis.
- You can upload custom audio for your alerts.
- You can customize how [Apple "Focuses"](https://support.apple.com/guide/mac-help/change-focus-settings-mchlff5da36d/mac) (Do Not Disturb, Work, Sleep) affect your notifications.

These settings are stored locally in YAML and can be modified either through the GUI or directly via the config file.

## Video that showcases the tool

<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; margin: 20px 0;">
  <iframe
    style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"
    src="https://www.youtube.com/embed/KT1uzZtKu-8?si=N0HREHVEeP74QAKi&vq=hd2160&quality=highres"
    title="Coding Agent Notifications Demo - Visual and Audio Alerts for Claude Code"
    frameborder="0"
    allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
    referrerpolicy="strict-origin-when-cross-origin"
    allowfullscreen
    loading="lazy">
  </iframe>
</div>

## Installation

It takes less than 60 seconds to install and start using our solution. The app needs to be opened once in order to enable notifications, after that the app does not need to be running in order for notifications to fire. Claude Code sessions that were started before the application is run for the first time will need to be restarted, due to the fact that ~/.claude/settings.json is read once at session startup.

<p style="margin-top: 20px; margin-bottom: 8px;"><strong>Option 1</strong></p>

<style>
.download-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 14px 28px !important;
  background-color: #000000 !important;
  color: #ffffff !important;
  text-decoration: none !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  font-size: 16px !important;
  transition: all 0.2s ease !important;
  margin: 20px 0 !important;
  border: 1px solid #000000 !important;
  line-height: 1.5 !important;
}

.download-button:hover {
  background-color: #1a1a1a !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  text-decoration: none !important;
}

.download-button:visited {
  color: #ffffff !important;
}

.download-button svg {
  flex-shrink: 0 !important;
  margin-left: -2px !important;
}
</style>

<a href="https://github.com/cwveysey/coding-agent-notifications-releases/releases/latest/download/Coding-Agent-Notifications-Installer.dmg" class="download-button" target="_blank" rel="noopener noreferrer">
  <svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg" aria-label="Download">
    <path d="M2.66821 12.6663V12.5003C2.66821 12.1331 2.96598 11.8353 3.33325 11.8353C3.70052 11.8353 3.99829 12.1331 3.99829 12.5003V12.6663C3.99829 13.3772 3.9992 13.8707 4.03052 14.2542C4.0612 14.6298 4.11803 14.8413 4.19849 14.9993L4.2688 15.1263C4.44511 15.4137 4.69813 15.6481 5.00024 15.8021L5.13013 15.8577C5.2739 15.9092 5.46341 15.947 5.74536 15.97C6.12888 16.0014 6.62221 16.0013 7.33325 16.0013H12.6663C13.3771 16.0013 13.8707 16.0014 14.2542 15.97C14.6295 15.9394 14.8413 15.8825 14.9993 15.8021L15.1262 15.7308C15.4136 15.5545 15.6481 15.3014 15.802 14.9993L15.8577 14.8695C15.9091 14.7257 15.9469 14.536 15.97 14.2542C16.0013 13.8707 16.0012 13.3772 16.0012 12.6663V12.5003C16.0012 12.1332 16.2991 11.8355 16.6663 11.8353C17.0335 11.8353 17.3313 12.1331 17.3313 12.5003V12.6663C17.3313 13.3553 17.3319 13.9124 17.2952 14.3626C17.2624 14.7636 17.1974 15.1247 17.053 15.4613L16.9866 15.6038C16.7211 16.1248 16.3172 16.5605 15.8215 16.8646L15.6038 16.9866C15.227 17.1786 14.8206 17.2578 14.3625 17.2952C13.9123 17.332 13.3553 17.3314 12.6663 17.3314H7.33325C6.64416 17.3314 6.0872 17.332 5.63696 17.2952C5.23642 17.2625 4.87552 17.1982 4.53931 17.054L4.39673 16.9866C3.87561 16.7211 3.43911 16.3174 3.13501 15.8216L3.01294 15.6038C2.82097 15.2271 2.74177 14.8206 2.70435 14.3626C2.66758 13.9124 2.66821 13.3553 2.66821 12.6663ZM9.33521 3.33333C9.33521 2.96606 9.63298 2.66829 10.0002 2.66829C10.3674 2.66847 10.6653 2.96617 10.6653 3.33333V10.8939L12.8625 8.69661L12.967 8.61165C13.2252 8.44092 13.5766 8.46925 13.804 8.69661C14.0633 8.95628 14.0634 9.37744 13.804 9.63704L10.47 12.97C10.3453 13.0947 10.1765 13.1653 10.0002 13.1654C9.82388 13.1654 9.65425 13.0948 9.52954 12.97L6.19653 9.63704L6.11157 9.53255C5.94101 9.27441 5.96924 8.9239 6.19653 8.69661C6.42382 8.46932 6.77433 8.44109 7.03247 8.61165L7.13696 8.69661L9.33521 10.8949V3.33333Z"></path>
  </svg>
  Download for macOS
</a>

<p style="margin-top: 20px; margin-bottom: 8px;"><strong>Option 2 (terminal)</strong></p>

<div class="minimal-code-block">
  <code>curl -fsSL https://cooperveysey.com/install.sh | bash</code>
  <button class="minimal-copy-btn" onclick="copyCommand('curl -fsSL https://cooperveysey.com/install.sh | bash', this)" aria-label="Copy to clipboard">
    <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5">
      <rect width="13" height="13" x="9" y="9" rx="2" ry="2"/>
      <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/>
    </svg>
  </button>
</div>

<style>
.minimal-code-block {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0;
  padding: 10px 12px;
  background: #fafafa;
  border-radius: 4px;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.minimal-code-block code {
  flex: 1;
  font-size: 13px;
  color: #24292f;
  background: transparent;
  padding: 0;
}

.minimal-copy-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.minimal-copy-btn:hover {
  opacity: 1;
}

.minimal-copy-btn svg {
  color: #57606a;
}
</style>

<script>
function copyCommand(text, button) {
  navigator.clipboard.writeText(text);
  const originalHTML = button.innerHTML;
  button.innerHTML = '<svg width="18" height="18" viewBox="0 0 16 16" fill="none"><path d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z" fill="#57606a"/></svg>';
  setTimeout(() => {
    button.innerHTML = originalHTML;
  }, 2000);
}
</script>

## Accounting for [Apple Focuses](https://support.apple.com/guide/mac-help/change-focus-settings-mchlff5da36d/mac)

Our visual notifications are delivered via <a href="https://github.com/julienXX/terminal-notifier" target="_blank" class="inline-link">terminal-notifier</a>, a utility for delivering native macOS notifications. By default, visual notifications are suppressed if a Focus (Do Not Disturb, Work, Sleep) is active. Follow the instructions below if you would like for our visual notifications to display regardless of whether a Focus is active.

- <a href="x-apple.systempreferences:com.apple.Focus-Settings.extension" class="inline-link">Open Focus Settings</a>.
- Select the Focus that you want to allow coding agent visual notifications for.
- From there select **Allowed Apps** from the **Allow Notifications** section, and add terminal-notifier to that list.

## Future plans for the tool

If other folks wind up using the tool and have feedback, I will definitely consider accounting for said feedback. I am also open to open-sourcing the tool.

I hope that the tool proves useful to at least a few other individuals — that would bring me a ton of joy. I enjoyed building this and learned a lot in the process. I continue to be amazed by what these coding agent tools can do.

**Backlog**

- Support for additional coding agents
- Support for Linux
- Allow for per-project customization
- Notification badges, subtle dock indicators
- Slack notifications, phone notifications (e.g. see https://justin.searls.co/posts/notify-your-iphone-or-watch-when-claude-code-finishes)
- "Smart" escalation rules (e.g. if no response after x time, ping y other channel)

## Thank you for your time

If you have any questions or want to connect on anything that I wrote about above, please [email me](mailto:cooper@veyseysoftwaresolutions.com) or [book some time on my calendar](https://calendar.google.com/calendar/appointments/schedules/AcZssZ041TFFhKz0LzQydfOipmZ3l8K-22DadOWnsRMPnLkS8TjaDIreyZ8fFxAimnDxsCeimFSvnY_3). Any and all feedback is of course so appreciated.
