You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
macOS notifications show as 'Script Editor' instead of terminal app — no click-to-focus #23446
On macOS, desktop notifications from OpenCode appear to come from "Script Editor" (AppleScript) instead of the terminal emulator (iTerm2, Terminal.app, etc.). Clicking the notification opens Script Editor instead of focusing the correct terminal tab.
This happens because OpenCode uses osascript -e 'display notification...' as a fallback, and macOS attributes the notification to the osascript process (Script Editor) rather than the terminal.
Expected Behavior
Notifications should be attributed to the terminal emulator (iTerm2, Terminal.app, etc.)
Clicking a notification should focus the correct terminal tab/window
On iTerm2 specifically, notifications should use OSC 9 escape sequences for native integration
Current State
I found PR #23212 (feat(tui): add terminal notifications by @kitlangton) which addresses this by adding:
OSC 9 escape sequences (\x1b]9;message\x07) for iTerm2, Ghostty, Apple Terminal, Warp
OSC 777 for Kitty, WezTerm, VTE-based terminals
Bell (\x07) as fallback
Auto-detection based on TERM_PROGRAM
However, this PR is:
Draft status
Has merge conflicts
Open since April 18
Suggested Fix
The notification resolution logic from PR #23212 looks correct:
// For iTerm2if(env.TERM_PROGRAM==="iTerm.app")return"osc9"// \x1b]9;title:body\x07// For Kitty/WezTermif(env.KITTY_WINDOW_ID||env.TERM==="xterm-kitty")return"osc777"// \x1b]777;notify;title;body\x07// Fallbackreturn"bell"// \x07
Additionally, for terminals that don't support OSC sequences, consider using terminal-notifier with -activate <bundle-id>:
iTerm2: com.googlecode.iterm2
Terminal.app: com.apple.Terminal
Warp: dev.warp.Warp-Stable
⚠️Do NOT use -sender flag — it conflicts with -activate on macOS Sequoia 15.x+ and breaks click-to-focus.
Activity
feat(tui): add terminal notifications via OSC escape sequences
github-actions commentedon Aug 18, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.