File paths not rendered as OSC 8 hyperlinks (cmd+click broken in Ghostty; works in other CLIs)
Summary
Claude Code does not emit OSC 8 terminal hyperlinks for file paths in its output. As a result, cmd+click on a file path in the Claude Code TUI does nothing, while the same path printed via printf or by other CLIs (Gemini CLI, plain shell ls) is clickable and opens in the default editor.
I believe this used to work in an earlier Claude Code version.
Reproduce
- Run Claude Code in Ghostty 1.3.1 on macOS.
- Ask Claude to mention any absolute file path, e.g.
/Users/me/project/README.md. - Try cmd+click on the path in the Claude Code TUI — nothing happens.
- In the same Ghostty window outside Claude Code, run:
````
printf 'click: \033]8;;file:///Users/me/project/README.md\033\\README.md\033]8;;\033\\\n'
— the link is underlined and cmd+click opens README.md.
- The same path printed by Gemini CLI in this Ghostty is also clickable.
Expected
Claude Code should wrap file paths in OSC 8 hyperlinks (with file:// scheme pointing at the absolute path) so terminals that support OSC 8 + file:// (Ghostty, iTerm2, WezTerm) can open them via cmd+click.
Environment
- Terminal: Ghostty 1.3.1 (stable)
- macOS: Darwin 24.0.0 (Sequoia)
- Claude Code version: (2.1.141)
Comparison
- Gemini CLI in the same Ghostty: OSC 8 file:// hyperlinks render correctly, cmd+click opens files.
printfwith OSC 8 escape sequence: works.- Therefore the regression appears to be in Claude Code's emitter, not in Ghostty or macOS.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗