Skip to content

fix(notify): cmux-compatible agent notifications without alerter - #40

Open
nakulbh wants to merge 1 commit into
mainfrom
fix/cmux-notify-compat
Open

fix(notify): cmux-compatible agent notifications without alerter#40
nakulbh wants to merge 1 commit into
mainfrom
fix/cmux-notify-compat

Conversation

@nakulbh

@nakulbh nakulbh commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Summary

OpenCode's notify plugin (kdco-notify) prefers cmux notify when CMUX_* env vars are set and cmux is on PATH. Without that path it falls back to the external alerter binary on macOS, which produced:

notify: macOS desktop notification skipped; alerter not found on PATH …

This PR makes rmux a drop-in cmux notify target so agent completion notifications go through rmux's socket API / desktop notifier instead of alerter.

  • Inject RMUX_* and CMUX_* into every PTY
  • Add rmux-cli __cmux-compat for notify / set-status / clear-status
  • Multi-call: binary named cmux is handled the same way
  • Install ~/.local/bin/cmux shim on first terminal spawn
  • Install rmux-cli + cmux symlink from install.sh
  • Route notification.create workspace/pane ids into the store

Test plan

  • cargo test -p rmux-cli --lib
  • cargo clippy -p rmux-cli -p rmux-app -p rmux-api -p rmux-terminal --all-targets -- -D warnings
  • Run rmux from this branch; open a new pane and confirm echo $CMUX_WORKSPACE_ID / $CMUX_SOCKET_PATH are set
  • Confirm ~/.local/bin/cmux exists and which cmux finds it
  • With rmux running: cmux notify --title "test" --body "hello" creates an in-app notification (no alerter)
  • Run OpenCode agent to completion inside rmux; alerter toast should not appear

OpenCode's notify plugin shells out to `cmux notify` when CMUX_* env
vars are set. Without that path it falls back to the external alerter
binary and surfaces a toast on macOS.

- Inject RMUX_* and CMUX_* into every PTY
- Add rmux-cli __cmux-compat (and argv0 `cmux`) for notify/set-status/clear-status
- Install ~/.local/bin/cmux shim on first terminal spawn
- Install rmux-cli + cmux symlink from install.sh
- Route notification.create workspace/pane ids into the store
Copilot AI review requested due to automatic review settings July 27, 2026 13:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants