macOS: Cmd+click can't open OSC 8 file:// links while an app has mouse reporting on (e.g. Claude Code fullscreen) #13060
Replies: 2 comments 2 replies
|
If you're a human, rewrite this in your own words and make a new discussion. We do not entertain fully LLM-generated reports. |
0 replies
|
Thank you for this bug report! The workaround of using |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
On macOS, Cmd+click does not open OSC 8 hyperlinks while a fullscreen TUI has mouse reporting enabled (for example Claude Code's fullscreen renderer, v2.1.89+). The same links open fine in a normal shell, and on Linux they open with Ctrl+click. It looks like the Cmd modifier is dropped when the click is forwarded to the application.
file://OSC 8 link.Captured Claude Code's output with
asciinema rec -f raw -c claude cc.raw, then extracted the OSC 8 sequences:So the link is well-formed: a
file://scheme plus anid=. The bare path you see on hover is Ghostty's own URL regex matching the displayed text/tmp/hello.txt, separate from the OSC 8 link underneath. (Same symptom as the older #11907 / #11908, but those were on a pre-fullscreen Claude Code; the cause below is specific to mouse reporting.)With no app mouse reporting active, all of these open on Cmd+click in 1.3.1 (point
file://at any path that exists):So OSC 8 handling itself is fine.
Claude Code's fullscreen/alt-screen TUI turns mouse reporting on. In that mode, Cmd+click reaches the app with the Cmd modifier stripped, byte-identical to a plain click, so neither the app nor Ghostty opens the link.
Minimal probe (run in Ghostty; then plain-click, Cmd+click, Cmd+Shift+click, then
q):Result here:
Cb=0 mods=[none]Cb=0 mods=[none](identical to plain, no Cmd bit)Cmd+Shift+click opens the link because Shift hands the click back to Ghostty (shift-capture). On Linux, plain Ctrl+click works because Ctrl is encodable in the SGR mouse report; macOS Cmd (Super) is not, which is why this is macOS-specific (see #12494).
Question: since macOS Cmd (Super) can't be encoded in the SGR mouse protocol, forwarding a Cmd+click drops the modifier and the app can't distinguish it from a normal click. Should Ghostty keep Cmd+click as a terminal-level open-link gesture while mouse reporting is active, the way the Shift bypass already does? The same Cmd+click works in cmux and is reported to work in iTerm2.
Environment: Ghostty 1.3.1 (stable, Metal, coretext), macOS 26.5 (25F71), Claude Code 2.1.185, default Ghostty config. Happy to share a sanitized asciinema cast.
All reactions