Skip to content

Markdown file:// links open in default browser (Edge) instead of VS Code editor #12661

@CT-2026

Description

@CT-2026

Environment:

  • OS: Windows 11 Pro 10.0.26200
  • VS Code: 1.109.5 (x64)
  • Extension: openai.chatgpt 0.5.76

Steps to reproduce:

  1. Open the ChatGPT/Codex sidebar in VS Code.
  2. Obtain any response that contains a Markdown link to a local .md file, for example:
    README.md
  3. Click the link inside the chat message rendering.

Expected:

  • The linked local Markdown file opens in a VS Code editor tab.

Actual:

  • The link opens via the OS default browser (Microsoft Edge), showing the Markdown in the browser.

Observed routing in extension source:
In webview/assets/index-*.js, the Markdown renderer attaches an onClick handler that dispatches "open-in-browser" for link clicks:

"_blank", rel:"noopener noreferrer", onClick:h=>{!a||!MZt(a)||(h.preventDefault(),Xt.dispatchMessage("open-in-browser",{url:TZt(a)}))}

In out/extension.js, the "open-in-browser" message is handled via vscode.env.openExternal():

case "open-in-browser": {
Ee.env.openExternal(Ee.Uri.parse(r.url));
break;
}

Result:

  • When the href is a file:// URI to a local .md, the click path goes through openExternal and is handed to the OS, which opens the default browser (Edge).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingextensionIssues related to the VS Code extensionwindows-osIssues related to Codex on Windows systems

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions