Markdown links with vscode:// (and other custom URL schemes) don't open when clicked in Claude Code Desktop
Summary
When Claude outputs a markdown link whose href is a custom URL scheme — e.g. vscode://file/<abs-path> — clicking it in the Claude Code Desktop app (macOS) does not open the target in the registered OS handler. Relative-path hrefs open in the built-in file viewer, but vscode://, cursor://, idea://, x-github-client://, obsidian://, etc. appear to be inert.
Expected behavior
Clicking [label](vscode://file/Users/me/proj/src/foo.py) should hand the URL off to the OS (open <url> on macOS) so the registered handler — VS Code in this case — takes over and jumps to the file.
This matters for users who prefer to read code in their editor rather than the built-in viewer, and for :line deep links.
Actual behavior
Clicking the link does nothing. The vscode:// scheme is not dispatched to the OS.
Reproduction
- In Claude Code Desktop (macOS), ask Claude for a file walkthrough.
- Tell it: \"use vscode://file/<abs-path> as the href so I can click into VS Code.\"
- Claude produces e.g.
\\\\
[churn/config.py](vscode://file/Users/me/project/churn/config.py)
\\
- Click the link in the chat pane.
- VS Code does not open. (Running \
open 'vscode://file/Users/me/project/churn/config.py'\from a standalone shell works, so the OS handler is registered.)
Suggested fix
When a rendered markdown link's href is not a relative path and not http(s)://, pass it through to the OS via open / xdg-open / start instead of silently ignoring or routing it through the internal file viewer. At minimum, support vscode://, cursor://, file://, idea://, and other schemes the user has registered at the OS level.
Alternatively, expose a setting like preferredEditor: \"vscode\" | \"cursor\" | \"builtin\" that rewrites relative-path file links to the corresponding deep link on render — so users don't have to prompt for absolute-path vscode:// URLs every time.
Environment
- Claude Code Desktop app (macOS)
- Claude Code version: 2.1.114
- macOS: 15.6
- VS Code: installed,
vscode://handler registered at OS level (verified viaopen vscode://file/...working from standalone shell)
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗