New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@serkanalgur/opencodev2-notification

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@serkanalgur/opencodev2-notification

Native OS notifications for OpenCode V2 - know when tasks complete, errors occur, or the AI needs your input

Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
7
-90%
Maintainers
1
Weekly downloads
 
Created
Source

@serkanalgur/opencodev2-notification

npm version License: MIT OpenCode Plugin GitHub stars GitHub issues

Native OS notifications for OpenCode V2

A plugin for OpenCode V2 that delivers native OS notifications when tasks complete, errors occur, or the AI needs your input.

Why This Exists

You delegate a task and switch to another window. Now you're checking back every 30 seconds. Did it finish? Did it error? Is it waiting for permission?

This plugin solves that:

  • Stay focused - Work in other apps. A notification arrives when the AI needs you.
  • Zero dependencies - Uses only built-in OS APIs (osascript, PowerShell, notify-send)
  • Native OS notifications - macOS Notification Center, Windows Toast, Linux Desktop Notifications
  • Smart defaults - Won't spam you. Only notifies for meaningful events with parent-session filtering and quiet-hours support.

Installation

opencode plugin add @serkanalgur/opencodev2-notification

Via opencode.json

Add to your opencode.json or opencode.jsonc:

{
  "plugins": ["@serkanalgur/opencodev2-notification"]
}

As a local plugin

Or copy the plugin files to your .opencode/plugins/ directory:

.opencode/plugins/notification/index.ts

How It Works

"Notify the human when the AI needs them back, not for every micro-event."

EventNotifies?SoundWhy
Session completeYesGlassMain task done - time to review
Session errorYesBassoSomething broke - needs attention
Permission neededYesSubmarineAI is blocked, waiting for you
Question askedYesSubmarine (default)Questions should always reach you promptly
Sub-task complete/errorNo (default)-Set notifyChildSessions: true to include child sessions

The plugin automatically:

  • Detects your terminal emulator
  • Suppresses notifications when your terminal is focused on macOS
  • Enables click-to-focus on macOS (click notification → terminal foregrounds)

Question notifications bypass macOS focus suppression so direct prompts are not missed.

Zero Dependencies - Pure Native!

This plugin uses built-in OS APIs only. No external packages to install!

PlatformMethodRequirements
macOSosascript (AppleScript)Built into macOS since 10.0
WindowsPowerShell Toast/BalloonTipBuilt into Windows 7+
Linuxnotify-send / dbus-sendPre-installed on most desktop distros

How It Works

  • macOS: Uses osascript -e 'display notification ...' - native Notification Center
  • Windows: Uses PowerShell with .NET Toast notifications (or BalloonTip fallback)
  • Linux: Uses notify-send (or dbus-send as fallback for minimal systems)

Platform Support

FeaturemacOSWindowsLinux
Native OS notificationsYesYesYes
Custom soundsYesNoNo
Focus detectionYesNoNo
Click-to-focusYesNoNo

Configuration (Optional)

Works out of the box. To customize, create ~/.config/opencode/opencodev2-notification.json:

{
  "notifyChildSessions": false,
  "timeout": 0,
  "terminal": "ghostty",
  "sounds": {
    "idle": "Glass",
    "error": "Basso",
    "permission": "Submarine",
    "question": "Submarine"
  },
  "quietHours": {
    "enabled": false,
    "start": "22:00",
    "end": "08:00"
  }
}

Configuration Keys

KeyTypeDefaultDescription
notifyChildSessionsbooleanfalseInclude child/sub-session notifications
timeoutnumber0Seconds before notification disappears (0 = no timeout)
terminalstringauto-detectOverride terminal auto-detection
sounds.idlestring"Glass"Sound for session complete
sounds.errorstring"Basso"Sound for errors
sounds.permissionstring"Submarine"Sound for permission requests
sounds.questionstring"Submarine"Sound for questions
quietHours.enabledbooleanfalseEnable quiet hours
quietHours.startstring"22:00"Quiet hours start (HH:MM)
quietHours.endstring"08:00"Quiet hours end (HH:MM)

Available macOS Sounds

Basso, Blow, Bottle, Frog, Funk, Glass, Hero, Morse, Ping, Pop, Purr, Sosumi, Submarine, Tink

FAQ

Does this add bloat to my context?

Minimal footprint. The plugin is event-driven - it listens for session events and fires notifications. No tools are added to your conversation.

Will I get spammed with notifications?

No. Smart defaults prevent noise:

  • Only notifies for parent sessions (not every sub-task)
  • Supports quiet-hours suppression
  • Suppresses when your terminal is the active window on macOS
  • Deduplication prevents rapid-fire notifications

Can I disable it temporarily?

Remove the plugin from your opencode.json or delete the plugin files.

Credits

Inspired by opencode-notify by kdcokenny.

License

MIT

Keywords

opencode

FAQs

Package last updated on 21 Sep 2026

Related posts