Markdown links with custom URL schemes (e.g. obsidian://) not rendered as OSC 8 hyperlinks
Description
Claude Code's markdown renderer generates OSC 8 terminal hyperlinks for http:// and https:// URLs, but not for custom URL schemes like obsidian://, vscode://, etc.
Environment
- Claude Code: latest (via
claudeCLI) - Terminal: Ghostty (xterm-ghostty)
- tmux: 3.6a with
terminal-features 'xterm*:hyperlinks' - OS: macOS (Darwin 24.6.0)
FORCE_HYPERLINK=1set insettings.jsonenv
Steps to Reproduce
- In Claude Code running inside tmux + Ghostty, output a markdown link with a custom scheme:
````
[Open in Obsidian](obsidian://open?vault=MyVault&file=test)
- The link text is displayed, but it is not clickable (no OSC 8 hyperlink generated).
- An
https://link in the same output is clickable.
Verification that the terminal supports custom scheme OSC 8
Running this directly in the same terminal session produces a clickable link that opens Obsidian:
echo -e '\033]8;;obsidian://open?vault=Obsidian&file=test\033\\Click to open Obsidian\033]8;;\033\\'
Similarly, vscode:// links also work via raw OSC 8:
printf '\033]8;;vscode://file//home/user/project/main.go\033\\Open in VS Code\033]8;;\033\\'
This confirms the terminal stack (Ghostty + tmux) fully supports OSC 8 hyperlinks with custom URL schemes. The issue is that Claude Code's renderer does not generate them.
Expected Behavior
Markdown links with any valid URL scheme should be rendered as OSC 8 hyperlinks, not just http(s)://.
Workaround
Using the open command via Bash tool to open custom-scheme URLs, but this loses the inline clickable link UX.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗