[PR #8976] feat: add macOS desktop notifications on session completion #12935

Closed
opened 2026-02-16 18:17:49 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/8976

State: closed
Merged: No


Summary

  • Add desktop notifications when sessions complete (macOS only)
  • Auto-detect terminal app (Ghostty, iTerm2, kitty, Terminal, etc.)
  • Click notification to activate terminal and switch to correct tmux window
  • Include session title, message preview, and tmux window name in notification

Features

  • Uses terminal-notifier for rich notifications with click actions
  • Falls back to osascript if terminal-notifier not installed
  • Detects terminal via TERM_PROGRAM env var and terminal-specific env vars
  • Captures tmux session/window info to enable window switching on click

Config

New notifications option (defaults to true):

{
  "notifications": false  // set to disable
}

Test plan

  • Run opencode in Ghostty with tmux, complete a session, verify notification appears
  • Click notification, verify it activates Ghostty and switches to correct tmux window
  • Test with notifications: false in config, verify no notification
  • Test without terminal-notifier installed, verify osascript fallback works
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/8976 **State:** closed **Merged:** No --- ## Summary - Add desktop notifications when sessions complete (macOS only) - Auto-detect terminal app (Ghostty, iTerm2, kitty, Terminal, etc.) - Click notification to activate terminal and switch to correct tmux window - Include session title, message preview, and tmux window name in notification ## Features - Uses `terminal-notifier` for rich notifications with click actions - Falls back to `osascript` if terminal-notifier not installed - Detects terminal via `TERM_PROGRAM` env var and terminal-specific env vars - Captures tmux session/window info to enable window switching on click ## Config New `notifications` option (defaults to `true`): ```json { "notifications": false // set to disable } ``` ## Test plan - [ ] Run opencode in Ghostty with tmux, complete a session, verify notification appears - [ ] Click notification, verify it activates Ghostty and switches to correct tmux window - [ ] Test with `notifications: false` in config, verify no notification - [ ] Test without terminal-notifier installed, verify osascript fallback works
yindo added the pull-request label 2026-02-16 18:17:49 -05:00
yindo closed this issue 2026-02-16 18:17:49 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12935