[BUG] OSC 777 works locally but not over SSH even though it should
Environment
- Platform (select one):
- [ ] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: <!-- output of
claude --version--> 1.0.44 - Operating System: <!-- e.g. macOS 14.3, Windows 11, Ubuntu 22.04 --> MacOS 15.1.1 locally (zsh), Ubuntu 22.04 on SSH (bash)
- Terminal: <!-- e.g. iTerm2, Terminal App --> Ghostty
Bug Description
<!-- A clear and concise description of the bug -->Locally, when I run CC I get notified via OSC 777 when CC need approval or at end of work, yet this doesn't happen over SSH.
Steps to Reproduce
- <!-- First step -->Trigger OS notification with prompt "wait for 2 secs then write 'hello' to file 'test.txt'" in CC and then move to some other app. Receive notification.
- <!-- Second step -->SSH to server and repeat- it will not trigger the notification
Expected Behavior
<!-- What you expected to happen -->OS notification when CC requests to make a write while working on remote SSH
Actual Behavior
<!-- What actually happened -->Notification not happening
Additional Context
<!-- Add any other context about the problem here, such as screenshots, logs, etc. -->CC should trigger notification correctly even over SSH:
Terminal over SSH is capable of correctlly handling the OSC 777- you can see by running this command in bash over ssh after focusing on another window on time:sleep 3 && printf '\e]777;notify;Build Status;Tests passed successfully!\e\'
<img width="336" height="67" alt="Image" src="https://github.com/user-attachments/assets/2520401e-3e12-4bbe-a64a-0d56386d371a" />
This is what the test printf triggers.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗