Skip to content

kdcokenny/opencode-notify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

opencode-notify

Know when your AI needs you back. Native OS notifications for OpenCode.

A plugin for OpenCode that delivers native desktop notifications when tasks complete, errors occur, or the AI needs your input. Stop tab-switching to check if it's done.

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.
  • Native feel - Uses macOS Notification Center, Windows Toast, or Linux notify-send.
  • Smart defaults - Won't spam you. Only notifies for meaningful events, and only when you're not already looking at the terminal.

Installation

Install via OCX, the package manager for OpenCode extensions:

# Install OCX
curl -fsSL https://ocx.kdco.dev/install.sh | sh

# Add the registry and install
ocx registry add --name kdco https://registry.kdco.dev
ocx add kdco/notify

Or get everything at once with kdco-workspace:

ocx add kdco/workspace

How It Works

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

Event Notifies? Sound Why
Session complete Yes Glass Main task done - time to review
Session error Yes Basso Something broke - needs attention
Permission needed Yes Submarine AI is blocked, waiting for you
Sub-task complete No - Parent session handles orchestration

The plugin automatically:

  1. Detects your terminal emulator (supports 37+ terminals)
  2. Suppresses notifications when your terminal is focused
  3. Enables click-to-focus on macOS (click notification → terminal foregrounds)

Platform Support

Feature macOS Windows Linux
Native notifications Yes Yes Yes
Custom sounds Yes No No
Focus detection Yes No No
Click-to-focus Yes No No
Terminal detection Yes Yes Yes

Configuration (Optional)

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

{
  "enabled": true,
  "notifyChildSessions": false,
  "suppressWhenFocused": true,
  "sounds": {
    "idle": "Glass",
    "error": "Basso",
    "permission": "Submarine"
  }
}

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, no prompts are injected beyond initial setup.

Will I get spammed with notifications?

No. Smart defaults prevent noise:

  • Only notifies for parent sessions (not every sub-task)
  • Suppresses when your terminal is the active window
  • Batches notifications when multiple delegations complete together

Can I disable it temporarily?

Set "enabled": false in the config file, or delete the config to return to defaults.

Supported Terminals

Uses detect-terminal to automatically identify your terminal. Supports 37+ terminals including:

Ghostty, Kitty, iTerm2, WezTerm, Alacritty, Hyper, Terminal.app, Windows Terminal, VS Code integrated terminal, and many more.

Manual Installation

If you prefer not to use OCX, copy the source from src/ to .opencode/plugin/.

Caveats:

  • Manually install dependencies (node-notifier, detect-terminal)
  • Updates require manual re-copying

Part of the OCX Ecosystem

This plugin is part of the KDCO Registry. For the full experience, check out kdco-workspace which bundles notifications with background agents, specialist agents, and planning tools.

Disclaimer

This project is not built by the OpenCode team and is not affiliated with OpenCode in any way.

License

MIT

About

Native OS notifications for OpenCode – know when tasks complete

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published