GUI: dispatch file:// and custom-scheme clicks to OS shell handler

Resolved 💬 2 comments Opened May 28, 2026 by stradinov Closed Jun 1, 2026

## Summary

In the Claude Code desktop GUI (verified on Windows), clicking a markdown link with a file:// URL opens the file in Claude Code's built-in internal file viewer; clicking a markdown link with an OS-registered custom URL scheme (e.g. phpstorm-open://, jetbrains://) does nothing. There is no way to route these clicks to the OS default handler (Windows ShellExecute / macOS LSOpenCFURLRef / Linux xdg-open).

This blocks the natural workflow of clicking a link in Claude's response to:

  • open a source file at line N in an external editor (PhpStorm, VS Code),
  • open a PDF / .docx / image in its default Windows app,
  • trigger any OS-registered URL handler (custom internal tools, Zoom, Slack, Figma).

Expected behavior

When the user clicks a markdown link whose URL scheme is either file:// or any scheme registered with the OS, the GUI should hand the URL off to the OS shell (shell.openExternal() in Electron terms) instead of intercepting it. This is the standard Electron pattern.

Optional refinement: Cmd/Ctrl+click as a modifier to force external open while plain click keeps current behavior for file://, mirroring the VS Code extension FR #43708.

Current behavior (Windows GUI, verified 2026-05-28)

| URL form | What happens |
|---|---|
| https://... (markdown link) | Opens in default browser. |
| file:///C:/path/file.md (markdown link) | Opens in Claude Code internal viewer; not in the Windows default app. No setting to change. |
| phpstorm-open://... (custom scheme registered in HKCU\Software\Classes\phpstorm-open) | Click does nothing. |
| Bare file path (no scheme) | Not linkified. |

Verification that the OS-level handler is fine: invoking the same phpstorm-open://... URL via Start-Process "<url>" in PowerShell does route through ShellExecute and opens PhpStorm at the correct file and line. So the OS dispatch works; only the GUI is not delegating.

Workarounds attempted

  • Custom protocol handler phpstorm-open:// registered in HKCU + wrapper that invokes phpstorm64.exe --line N. Works perfectly via Start-Process, but not via clicking in the GUI.
  • Markdown file:// link: opens internal viewer, not external app.
  • Operational workaround in use: emit the markdown link plus a Start-Process "<url>" command below, so the user can copy-paste to an external PowerShell.

Related

  • #13008 — OSC 8 hyperlinks for clickable file paths (about linkability of bare paths, not OS dispatch).
  • #43708 — VS Code extension: Ctrl+Shift+Click file:// to open externally (similar ask, different surface).

Environment

  • Claude Code (desktop GUI), version 2.1.142
  • OS: Windows

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗