{"slug": "my-ai-agent-kept-waiting-on-me-i-built-a-vs-code-extension-to-fix-that", "title": "My AI agent kept waiting on me. I built a VS Code extension to fix that", "summary": "Developer Chahe Dridi released Notification Bell, a free VS Code extension that plays a sound and sends an OS notification when a terminal-based AI agent such as Claude Code, aider, Gemini CLI, Codex CLI, or Cursor CLI needs user input. The extension, available for VS Code 1.93.0 or later on macOS, Linux, and Windows, also adds a status bar badge and optional reminder escalation to prevent missed prompts from causing agent timeouts or context loss.", "body_md": "**Never miss an AI agent waiting on you again.**\n\nPlays a sound and sends an OS notification the moment your AI agent needs attention — whether it's waiting for confirmation, asking to run a command, or finished its turn.\n\nWorks with **Claude Code**, **aider**, **Gemini CLI**, **Codex CLI**, **Cursor CLI**, and any other terminal-based AI agent.\n\n[Why Notification Bell?](#why-notification-bell)[Requirements](#requirements)[Installation](#installation)[Quick Start](#quick-start)[Claude Code Integration](#claude-code-integration)[Terminal Watching (Other Agents)](#terminal-watching-other-agents)[How It Works](#how-it-works)[Features](#features)[Commands](#commands)[Settings](#settings)[Tuning Patterns for Your Agent](#tuning-patterns-for-your-agent)[Limitations](#limitations)[Support the Project](#support-the-project)[Contributing](#contributing)\n\nWhen AI agents run long tasks you switch to another window — and miss the moment they stop to ask you something. Every missed prompt means waiting for the agent to time out or lose context.\n\nNotification Bell closes that gap:\n\n**Instant audio alert** the moment an agent needs your input**OS notification** so you're notified even when VS Code isn't focused**Status bar badge**`🔔 7`\n\nshowing how many alerts fired this session**Reminder escalation**— re-alerts every N minutes if you still haven't responded** Zero configuration**required — sensible defaults work out of the box\n\n**VS Code** 1.93.0 or later**macOS**— uses`afplay`\n\n(built-in, no install needed)**Linux**— uses`paplay`\n\n(PulseAudio) or`aplay`\n\n(ALSA);`notify-send`\n\nfor OS notifications (`libnotify-bin`\n\non Debian/Ubuntu)**Windows**— uses PowerShell`SoundPlayer`\n\n; no additional dependencies**Claude Code integration**— requires Claude Code installed (`~/.claude/`\n\nmust exist)\n\nSearch **\"Notification Bell\"** in the VS Code Extensions view (`Ctrl+Shift+X`\n\n), or run:\n\n```\ncode --install-extension chahe-dridi.agent-confirm-sound\n```\n\n**1. Install the extension** — the status bar shows `🔔`\n\nwhen active.\n\n**2. For Claude Code users** — accept the setup prompt on first launch, or run:\n\n`Ctrl+Shift+P`\n\n→`Notification Bell: Set Up Claude Code Integration`\n\n**3. For other agents** — it works automatically. Use `terminalNameFilter`\n\nto limit which terminals are watched:\n\n```\n\"agentConfirmSound.terminalNameFilter\": [\"claude\"]\n```\n\nThat's it. The bell fires the moment your agent needs you.\n\nOn first install, Notification Bell offers to set up a direct integration with Claude Code. Accept and it will:\n\n- Copy the notification sound to\n`~/.claude/agent-bell-notify.wav`\n\n— a stable path that survives extension updates - Add hooks to\n`~/.claude/settings.json`\n\n:\n\n| Hook | Fires when |\n|---|---|\n`Stop` |\nClaude finishes its turn and is waiting for your next message |\n`Notification` |\nClaude Code sends a background notification (e.g. window not focused) |\n\nThese hooks run directly from Claude Code's process — **they work even when VS Code is not in focus**. Each hook also writes to `~/.claude/agent-bell-signal`\n\nso the extension can flash the status bar and show an OS notification inside VS Code.\n\n**To set up manually:**\n`Ctrl+Shift+P`\n\n→ `Notification Bell: Set Up Claude Code Integration`\n\n**To remove:**\n`Ctrl+Shift+P`\n\n→ `Notification Bell: Remove Claude Code Integration`\n\nPreToolUse hook:If you run Claude Code with manual bash approval (`requiresApproval`\n\n), enable`agentConfirmSound.hookPreToolUse: true`\n\nand reinstall the integration. Leave this off if bash is auto-approved — it would fire on every command.\n\nBefore uninstalling:run`Notification Bell: Remove Claude Code Integration`\n\nfirst to clean up hooks and the copied sound file from`~/.claude/`\n\n.\n\nPrivacy:Notification Bell only writes to your local`~/.claude/settings.json`\n\n. No data is read, collected, or sent anywhere.\n\nFor agents running in a standard VS Code terminal — aider, Gemini CLI, custom scripts — Notification Bell watches terminal output and plays a sound when a line matches a configured regex pattern such as `(y/n)`\n\n, `Allow this action?`\n\n, or `Press enter to confirm`\n\n.\n\nRequires shell integration, which is on by default for bash, zsh, fish, and PowerShell in recent VS Code. A small decoration appears to the left of your prompt when it's active.\n\n**Quick setup for common agents:**\n\n| Agent | `terminalNameFilter` value |\n|---|---|\n| Claude Code | `[\"claude\"]` |\n| aider | `[\"aider\"]` |\n| Gemini CLI | `[\"gemini\"]` |\n| Codex CLI | `[\"codex\"]` |\n\nLeave the filter empty (`[]`\n\n) to watch all terminals.\n\n```\nClaude Code (UI / CLI)\n  └── ~/.claude/settings.json hooks\n        ├── Stop         → plays sound + writes ~/.claude/agent-bell-signal\n        └── Notification → plays sound + writes ~/.claude/agent-bell-signal\n              └── fs.watch() in extension\n                    └── status bar flash + OS notification\n\nOther terminal agents (aider, Gemini CLI, scripts, etc.)\n  └── VS Code shell integration API\n        └── pattern match on terminal output\n              └── sound + status bar flash + OS notification\n```\n\n| Feature | |\n|---|---|\n| 🪝 | Claude Code hook integration — works without shell integration, even when VS Code is not focused |\n| 🔊 | Sound alert on any configurable regex pattern in terminal output |\n| ⏱️ | Command-end alert — plays when long-running commands finish (configurable minimum duration) |\n| 🔔 | Status bar badge — shows session alert count (`🔔 7` ), flashes on alert, click to pause/resume |\n| 🖥️ | OS notification when VS Code is not focused (Windows balloon / macOS notification center / Linux notify-send) |\n| ⏰ | Reminder escalation — re-alerts after N minutes if you haven't responded |\n| 🎵 | Two bundled sounds + support for custom files with random or fixed rotation |\n| 🔉 | Volume control on all platforms (afplay / paplay / WAV sample scaling on Windows) |\n| 🔍 | Terminal name filter — watch only terminals named \"claude\" or \"aider\" |\n| 🧪 | Pattern tester — paste terminal output, see which pattern matched, copies regex to clipboard |\n| 📋 | Alert history — last 50 alerts with time, source, and trigger |\n| 🛠️ | Reset to Defaults command |\n| 🌍 | Cross-platform — macOS, Windows, Linux |\n\nOpen the Command Palette (`Ctrl+Shift+P`\n\n) and type \"Notification Bell\":\n\n| Command | Description |\n|---|---|\n`Notification Bell: Toggle Watching` |\nPause or resume terminal watching. Also available via status bar click. |\n`Notification Bell: Play Test Sound` |\nPlay the alert sound immediately to verify audio is working. |\n`Notification Bell: Show Log` |\nOpen the output channel for match logs and debug info. |\n`Notification Bell: Test Pattern` |\nEnter terminal output — see which pattern matched and copies the regex to clipboard. |\n`Notification Bell: Set Up Claude Code Integration` |\nInstall Stop + Notification hooks into `~/.claude/settings.json` . |\n`Notification Bell: Remove Claude Code Integration` |\nRemove hooks and delete the copied sound file. Run before uninstalling. |\n`Notification Bell: Manage Sounds` |\nSwitch between bundled sounds, add custom files, toggle random mode. |\n`Notification Bell: Add Sound File` |\nBrowse and add a custom sound file (.wav / .mp3 / .aiff). |\n`Notification Bell: Show Alert History` |\nView the last 50 alerts this session — time, source, and what triggered each. |\n`Notification Bell: Reset to Defaults` |\nReset all Notification Bell settings to their defaults. |\n\nOpen Settings (`Ctrl+,`\n\n) and search **\"Notification Bell\"**, or add to `settings.json`\n\n:\n\n| Setting | Default | Description |\n|---|---|---|\n`agentConfirmSound.enabled` |\n`true` |\nTurn terminal watching on/off. |\n`agentConfirmSound.patterns` |\n(see below) |\nCase-insensitive regex array matched against terminal output. |\n`agentConfirmSound.terminalNameFilter` |\n`[]` |\nOnly watch terminals whose name contains one of these strings. Empty = watch all. |\n`agentConfirmSound.debounceMs` |\n`4000` |\nMinimum ms between alerts per terminal — prevents repeated sounds on the same prompt. |\n\n| Setting | Default | Description |\n|---|---|---|\n`agentConfirmSound.sounds` |\n`[]` |\nList of custom sound file paths. Empty = use bundled sound. |\n`agentConfirmSound.soundMode` |\n`\"fixed\"` |\n`\"fixed\"` uses the first sound. `\"random\"` picks one at random each alert. |\n`agentConfirmSound.volume` |\n`1` |\nVolume 0–1. Applied via afplay (macOS), paplay (Linux), WAV sample scaling (Windows). |\n\n| Setting | Default | Description |\n|---|---|---|\n`agentConfirmSound.focusTerminal` |\n`false` |\nAuto-focus the matching terminal when an alert fires. |\n`agentConfirmSound.alertOnCommandEnd` |\n`true` |\nPlay a sound when any long-running terminal command finishes. |\n`agentConfirmSound.commandEndMinDurationMs` |\n`3000` |\nMinimum command duration (ms) before \"command finished\" fires. Quick commands like `ls` are ignored. |\n`agentConfirmSound.osNotification` |\n`true` |\nShow an OS-level notification when VS Code is not focused. |\n`agentConfirmSound.reminderIntervalMs` |\n`0` |\nRe-alert after this many ms if you haven't responded. `0` = disabled. |\n`agentConfirmSound.reminderMaxCount` |\n`3` |\nMaximum number of reminders before stopping. |\n\n| Setting | Default | Description |\n|---|---|---|\n`agentConfirmSound.hookPreToolUse` |\n`false` |\nAlso fire on Claude Code's PreToolUse(Bash) hook. Only useful with manual bash approval. |\n\n| Setting | Default | Description |\n|---|---|---|\n`agentConfirmSound.debugLog` |\n`false` |\nLog every terminal chunk to the output channel. Use to tune patterns — disable when done. |\n\nTwo sounds ship with the extension, selectable from **Notification Bell: Manage Sounds**:\n\n| Sound | Description |\n|---|---|\n`notify.wav` |\nShort, crisp chime (default) |\n`notification-bell.mp3` |\nFuller bell tone |\n\nNo configuration needed — open the command and click to switch.\n\n```\n\"agentConfirmSound.patterns\": [\n  \"\\\\(y\\\\s*/\\\\s*n\\\\)\",\n  \"\\\\[y\\\\s*/\\\\s*n\\\\]\",\n  \"\\\\(Y\\\\s*/\\\\s*n\\\\)\",\n  \"\\\\[Y\\\\s*/\\\\s*n\\\\]\",\n  \"do you want to proceed\",\n  \"do you want to continue\",\n  \"allow this (action|command|tool)\",\n  \"would you like to proceed\",\n  \"press enter to confirm\",\n  \"confirm\\\\?\\\\s*$\",\n  \"proceed\\\\?\\\\s*$\",\n  \"continue\\\\?\\\\s*$\",\n  \"\\\\(yes/no\\\\)\",\n  \"type ['\\\"]?yes['\\\"]? to continue\",\n  \"allow (read|write|execute|bash|edit|create|delete|tool)\",\n  \"do you want claude\",\n  \"waiting for (your )?input\",\n  \"execute.*\\\\?\",\n  \"overwrite.*\\\\?\",\n  \"enter (your )?choice\",\n  \"are you sure\\\\?\",\n  \"\\\\[A\\\\]llow\",\n  \"press any key\"\n]\n```\n\nPatterns removed for causing false positives:\n\n`\"approve|reject.*action\"`\n\n(bare word too broad),`\"tool (call|use|request)\"`\n\n(matched Claude's own log lines),`\"run this command\"`\n\n(matched narration).\n\n**Watch only Claude Code terminals:**\n\n```\n\"agentConfirmSound.terminalNameFilter\": [\"claude\"]\n```\n\n**Custom sound at half volume:**\n\n```\n\"agentConfirmSound.sounds\": [\"/Users/you/sounds/ping.wav\"],\n\"agentConfirmSound.volume\": 0.5\n```\n\n**Multiple sounds in random rotation:**\n\n```\n\"agentConfirmSound.sounds\": [\n  \"/Users/you/sounds/ping.wav\",\n  \"/Users/you/sounds/chime.wav\"\n],\n\"agentConfirmSound.soundMode\": \"random\"\n```\n\n**2-minute reminders, up to 3 times:**\n\n```\n\"agentConfirmSound.reminderIntervalMs\": 120000,\n\"agentConfirmSound.reminderMaxCount\": 3\n```\n\nEvery agent phrases prompts differently. To find the exact text yours outputs:\n\n- Set\n`\"agentConfirmSound.debugLog\": true`\n\n- Open\n**Notification Bell: Show Log** - Trigger a prompt in your agent\n- Copy the\n`[debug]`\n\nline text - Run\n**Notification Bell: Test Pattern** and paste it — shows which pattern matched and copies the regex to your clipboard - Paste directly into\n`agentConfirmSound.patterns`\n\nin`settings.json`\n\n- Set\n`\"agentConfirmSound.debugLog\": false`\n\nwhen done\n\n- Terminal watching requires shell integration. Full-screen TUI apps that repaint the terminal (like Claude Code CLI in interactive mode) may not expose clean text — use the Claude Code hook integration instead.\n`PreToolUse`\n\nfires before**every** bash command, not just approval prompts. Leave`hookPreToolUse`\n\noff unless you use manual approval mode.- Volume scaling only applies to uncompressed 16-bit PCM WAV files. MP3 and other formats play at their encoded volume on Windows.\n- Linux OS notifications require\n`notify-send`\n\n(`libnotify-bin`\n\non Debian/Ubuntu,`libnotify`\n\non Arch). The extension logs a warning if it's missing. - The Claude Code hook integration requires Claude Code to be installed (\n`~/.claude/`\n\nmust exist).\n\nIf Notification Bell saves you from missing a prompt, a ⭐ on GitHub helps others find it.\n\nFound a bug or want to add support for a new agent? Contributions are welcome.\n\nSee ** CONTRIBUTING.md** for the full guide — branch strategy, pattern rules, and dev environment setup.\n\nLook for [ good first issue](https://github.com/chahe-dridi/vscode-agent-bell/issues?q=is%3Aopen+label%3A%22good+first+issue%22) labels to find something to work on.\n\n**Branch strategy:** all PRs go against `dev`\n\n, not `master`\n\n. `master`\n\nis the stable marketplace branch.\n\n```\ngit clone https://github.com/chahe-dridi/vscode-agent-bell.git\ncd vscode-agent-bell\ngit checkout dev\nnpm install\nnpm run compile\n# Press F5 in VS Code to launch the Extension Development Host\n# Build and install locally for testing\nnpm run package\ncode --install-extension dist/agent-confirm-sound-<version>.vsix --force\n```\n\n", "url": "https://wpnews.pro/news/my-ai-agent-kept-waiting-on-me-i-built-a-vs-code-extension-to-fix-that", "canonical_source": "https://github.com/chahe-dridi/vscode-agent-bell", "published_at": "2026-09-03 11:04:09+00:00", "updated_at": "2026-09-03 11:23:40.317972+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools", "ai-agents"], "entities": ["Chahe Dridi", "Notification Bell", "VS Code", "Claude Code", "aider", "Gemini CLI", "Codex CLI", "Cursor CLI"], "alternates": {"html": "https://wpnews.pro/news/my-ai-agent-kept-waiting-on-me-i-built-a-vs-code-extension-to-fix-that", "markdown": "https://wpnews.pro/news/my-ai-agent-kept-waiting-on-me-i-built-a-vs-code-extension-to-fix-that.md", "text": "https://wpnews.pro/news/my-ai-agent-kept-waiting-on-me-i-built-a-vs-code-extension-to-fix-that.txt", "jsonld": "https://wpnews.pro/news/my-ai-agent-kept-waiting-on-me-i-built-a-vs-code-extension-to-fix-that.jsonld"}}