Skip to content

Sub-Agents Constantly Trigger OS Notifications #13334

Closed as not planned
Closed as not planned

Description

@JuliaBonita

Description

PROBLEM: Recently, with Claude (maybe others, too) the sub-agents started becoming more active and constantly triggering the OS notifications as the sub-agents complete their sub-tasks. So now every session is filled with constant OS notifications. This creates so many false positives that the OS notifications are essentially meaningless now for their intended purpose.

SOLUTION: The OS notifications should only be triggered when the primary LLM is actually finished with the task and/or waiting for a response from the user.

OpenCode version

LATEST

Operating System

MacOS

Terminal

WizTerm

Activity

  1. rekram1-node commented on Feb 12, 2026

    @rekram1-node
    Contributor

    What "notifications" are u using plugins? Or the desktop app? What are u referring to.

  2. JuliaBonita commented on Feb 12, 2026

    @JuliaBonita
    Author

    Yes, it's a plugin with this code:

    export const NotificationSoundPlugin = async ({ project, client, $, directory, worktree }) => {
      return {
        event: async ({ event }) => {
          if (event.type === "session.idle") {
            const result = await $`osascript -e 'tell application "System Events" to get name of first application process whose frontmost is true'`.text();
            const focusedApp = result.trim().toLowerCase();
    
            const terminalApps = ['opencode', 'terminal', 'iterm', 'iterm2', 'warp', 'alacritty', 'kitty'];
            const isTerminalFocused = terminalApps.some(app => focusedApp.includes(app));
    
            if (!isTerminalFocused) {
              const timestamp = new Date().toLocaleTimeString();
              const message = `${timestamp}`;
              await $`/usr/local/bin/alerter -title OpenCode -subtitle "Agent Ready" -message ${message} -sound Blow -group opencode-idle -timeout 0`.quiet();
            }
          }
        }
      };
    };
    

    How do I update the plugin to only trigger the notification when the main LLM agent actually needs attention?

  3. Tenrys commented on Mar 5, 2026

    @Tenrys

    Wondering about this too, this simple plugin is also hit by the issue: https://gist.github.com/ahosker/267f375a65378bcb9a867fd9a195db1e#file-opencode-terminal-bell-plugin-md

    Fixing this + having a way to know when an agent needs permissions / asks a question would be golden.

  4. removed
    bugSomething isn't working
    on May 3, 2026
  5. github-actions commented on Jul 3, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions