An OpenCode plugin that integrates with cmux to show live OpenCode activity in the sidebar and send attention notifications when OpenCode needs you.
It adds:
- live cmux status for active OpenCode work
- active subagent names when they are known
- question and permission attention notifications
- retry, error, and finished notifications
- automatic status clearing when work is no longer active
After publishing, add the package name to your OpenCode config:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-cmux-notify-plugin"]
}OpenCode installs npm plugins automatically using Bun at startup.
If you want to install it without npm, copy the plugin file into your OpenCode plugins directory:
mkdir -p ~/.config/opencode/plugins
cp opencode-cmux-notify.js ~/.config/opencode/plugins/OpenCode will load local plugins from that directory automatically.
Once loaded, the plugin automatically reacts to OpenCode session events. No additional registration step is required.
- Uses
cmux set-status/clear-statusfor live activity - Uses
cmux notifyfor attention-worthy events - Clears stale cmux notifications when new OpenCode activity begins
- Tracks child subagent lifecycle so finished agent labels disappear
- Prioritizes pending questions over ordinary busy status when multiple sessions exist
question.asked→ showsNeeds answer: ...and sends a notificationpermission.asked→ sends a permission notificationsession.statusbusy/retry → shows active status in cmux- child subagent sessions → shows inline subagent names like
⏳ oracle, ⏳ explore session.error→ sends an error notification- root
session.idle→ clears active status and sends a finish notification
- If you do not see updates, make sure
cmuxis installed and callable from the same shell environment OpenCode uses. - If notifications look stale, restart OpenCode once after updating the plugin so the latest lifecycle logic is loaded.
- If you use multiple OpenCode sessions, the shared cmux status shows the most relevant active root session, prioritizing pending questions.
This plugin is intentionally build-free and ESM-only. The repo keeps a single runtime file so installation stays simple.
- npm package name:
opencode-cmux-notify-plugin - OpenCode config entry:
"plugin": ["opencode-cmux-notify-plugin"] - Requires
cmuxto be installed and available onPATH
MIT