File links in output open browser 404 tab when using VS Code tunnel

Resolved 💬 2 comments Opened Feb 9, 2026 by Ashkaan Closed Mar 10, 2026

Description

When using Claude Code via VS Code tunnel (browser-based remote access), clicking a file reference link in the Claude Code output panel opens the file correctly in the editor and simultaneously opens a new browser tab that navigates to the relative path on *.vscode-cdn.net, resulting in a 404 error page.

Steps to Reproduce

  1. Connect to a remote machine via VS Code tunnel (browser-based, not desktop SSH remote)
  2. Use Claude Code in the extension panel
  3. Claude outputs a response with a file reference link (e.g., [filename.ts](src/filename.ts))
  4. Click the link

Expected Behavior

The file opens in the VS Code editor. No browser tab is opened.

Actual Behavior

  • The file opens in the VS Code editor (correct)
  • A new browser tab also opens, navigating to https://<tunnel-id>.vscode-cdn.net/src/filename.ts, which returns a 404: "The requested content does not exist" (incorrect)

Root Cause

In desktop VS Code, webview link clicks are fully intercepted by the extension. In browser/tunnel mode, the webview runs inside the browser, so clicking a relative-path markdown link triggers both the extension's handler (opening the file) and the browser's default link navigation (404). The extension's webview likely needs to call preventDefault() on link click events to suppress the browser's default navigation behavior.

Environment

  • VS Code tunnel (browser-based)
  • Linux remote host
  • Claude Code VS Code extension

View original on GitHub ↗

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