Notification click should focus the correct terminal window (multi-window support)
Resolved 💬 2 comments Opened Mar 4, 2026 by JackChen-me Closed Apr 2, 2026
Problem
When using Claude Code inside Cursor (or Warp), push notifications appear correctly when Claude needs user input (permission prompts, questions, task completion, etc.). However, clicking the notification does not navigate to the corresponding terminal window.
This is especially painful when running multiple Cursor windows, each with its own Claude Code session. The user has no way to jump directly to the session that needs attention.
Current Behavior
- Claude Code triggers a notification (e.g., "Permission required" or "Task complete")
- User clicks the notification
- Nothing happens — the correct Cursor/Warp window is not focused
Expected Behavior
Clicking the notification should:
- Activate the correct host application (Cursor / Warp / Terminal / iTerm2)
- Focus the specific window where the Claude Code session is running (matched by project/workspace name)
- Ideally scroll to or highlight the pending prompt
Environment
- macOS (Darwin)
- Claude Code running inside Cursor (Electron-based, multiple windows) and Warp
- Using
claude-notifications-goplugin withclickToFocus: true terminalBundleIdconfig exists but only supports a single app, not multi-window targeting
Workaround
I wrote a custom hook script that:
- Reads
cwdfrom the hook input JSON - Detects the terminal app via
TERM_PROGRAMenv var - Uses AppleScript to find the window whose title contains the project folder name
- Brings that specific window to front
This works but is fragile and platform-specific. Native support would be much better.
Suggestion
- Include window/session identifier in notification metadata
- On macOS, use
NSUserNotification(orUNUserNotification) with an activation handler that focuses the correct window - Support multi-window scenarios where multiple Claude Code sessions run simultaneously
- Consider deep-link or callback URL scheme for cross-app navigation
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗