[Feature Request] Emit OSC-8 hyperlinks for file paths in CLI output
Feature Discription
Feature request: emit OSC-8 hyperlinks for file paths in CLI output
Love using Claude Code in the terminal — one thing that would make the experience noticeably better: OSC-8 hyperlinks for file paths in output.
When Claude references a file like Assets/Scripts/Foo.cs:42, it's currently plain text. Terminals that support OSC-8 (Ghostty, iTerm2, WezTerm, Kitty) can render these as clickable links that jump directly to the file and line — but only if the CLI wraps the path in the escape sequence.
OSC-8 format:
\e]8;;file:///absolute/path/to/file\e\\visible text\e]8;;\e\\
For line-aware editors, the URI can use file:///path/to/file:line:col.
This would bring terminal CLI users closer to the navigation experience the IDE extension already offers, without requiring the extension. Given how often Claude references specific files and lines, this would be a genuinely useful quality-of-life improvement for terminal-first workflows.
Thanks for considering it!
Environment Info
- Platform: darwin
- Terminal: ghostty
- Version: 2.1.185
- Feedback ID: 2557044a-e1f4-4580-ac9e-99e5c441fcf4
Addendum:
Line number navigation doesn't work even when the current link mechanism is clickable — the file opens but the cursor doesn't jump to the referenced line. The URI likely uses file:///path/to/file without :line:col. Supporting file:///path/to/file:49 would fix this.