Preflight Checklist
What's Wrong?
Claude Code isn't querying the terminal for OSC99 support (desktop notifications), but rather (I assume from testing) hard-codedly assumes certain terminals or environments have or don't have support for it.
What Should Happen?
Claude Code should query the terminal for support as the protocol specifies: https://sw.kovidgoyal.net/kitty/desktop-notifications/#querying-for-support
Error Messages/Logs
Steps to Reproduce
Umm... not trivial, but sure:
- Start Claude Code inside a PTY environment you control (I'm using zellij). And log all ANSI instructions received from the pane running Claude Code
- Note that the query string described in https://sw.kovidgoyal.net/kitty/desktop-notifications/#querying-for-support is not received
- If above environment from 1 is started in a terminal that supports desktop notifications (eg. Kitty), the desktop notifications are sent anyway, if it starts in a terminal that does not support them (eg. Alacritty) the desktop notifications are not sent. I assume this is also the case for terminals that might support them but Claude doesn't hard-codedly know about
Claude Model
None
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.1.86 (Claude Code)
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
Hi Anthropic 👋
I'm a Zellij maintainer. I was asked by many users to add support for Desktop Notifications so that they can pass through Zellij to the host terminal when they're using Claude Code.
While I recently implemented them so that they work out of the box with Zellij, I was disappointed to find out that with Claude Code they will only work with terminals that support them. This seems to happen (as described above) because Claude Code doesn't query the terminal for support, but rather assumes support or lack thereof based on the detected terminal.
This is unfortunate, seeing as Zellij has the ability to make them work out of the box in any terminal by proxying them to supported tools on the user's machine. But this won't work unless Claude complies to the protocol.
Thanks!
Preflight Checklist
What's Wrong?
Claude Code isn't querying the terminal for OSC99 support (desktop notifications), but rather (I assume from testing) hard-codedly assumes certain terminals or environments have or don't have support for it.
What Should Happen?
Claude Code should query the terminal for support as the protocol specifies: https://sw.kovidgoyal.net/kitty/desktop-notifications/#querying-for-support
Error Messages/Logs
Steps to Reproduce
Umm... not trivial, but sure:
Claude Model
None
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.1.86 (Claude Code)
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
Hi Anthropic 👋
I'm a Zellij maintainer. I was asked by many users to add support for Desktop Notifications so that they can pass through Zellij to the host terminal when they're using Claude Code.
While I recently implemented them so that they work out of the box with Zellij, I was disappointed to find out that with Claude Code they will only work with terminals that support them. This seems to happen (as described above) because Claude Code doesn't query the terminal for support, but rather assumes support or lack thereof based on the detected terminal.
This is unfortunate, seeing as Zellij has the ability to make them work out of the box in any terminal by proxying them to supported tools on the user's machine. But this won't work unless Claude complies to the protocol.
Thanks!