Windows local file links in the Codex VS Code chat window open the browser instead of VS Code

In the VS Code Codex chat window, local file links are unstable on Windows.

Some Markdown local links open the browser instead of VS Code, and some fail entirely. The behavior seems to depend on file type and path encoding.

I verified locally that the robust fix is:

  • decode and normalize local paths before opening them
  • route text files and non-text files differently
  • keep vscode.open as a fallback

This is reproducible on Windows and affects plain text files, images, archives, cache/metadata files, and paths with Chinese characters or special characters such as + and -.

Hi Lucas — thanks for documenting the Windows file-link behavior and the workaround you found.

Since this topic has been inactive for some time, we’re closing it now. If local file links are still opening incorrectly with the current Codex VS Code extension, please start a new topic with your current extension version, Windows version, and an updated reproduction.

Thanks for being part of the community.

Avinash