[BUG] UNC path (\\server\share) mangled to single backslash when using "Open in VS Code" button
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When the working directory is set to a UNC path (e.g., \\UNRAID\appdata), clicking the "Open in VS Code" button in the VS Code extension causes VS Code to show an error:
Path does not exist The path '\UNRAID\appdata\' does not exist on this computer.
The double backslash at the start of the UNC path is being reduced to a single backslash (\UNRAID\appdata instead of \\UNRAID\appdata), making the path invalid. This is a UNC path escaping bug — the leading \\ is being collapsed to \ before being passed to VS Code's vscode:// URI handler.
Related issue: #29935 describes a separate but related UNC path bug (permissions being ignored on UNC workspaces). That bug is about settings.json path matching; this bug is specifically about the "Open in VS Code" button corrupting the UNC path prefix.
What Should Happen?
VS Code should open the correct UNC path \\UNRAID\appdata without modifying it. The double backslash prefix is required for Windows UNC paths and must be preserved.
Error Messages/Logs
Steps to Reproduce
- On Windows, use a network share via UNC path, e.g.,
\\UNRAID\appdata - Open the Claude Code VS Code extension with the working directory set to
\\UNRAID\appdata - Click the "Open in VS Code" button in the extension
- VS Code shows: "Path does not exist — The path '\UNRAID\appdata\' does not exist on this computer."
The leading \\ of the UNC prefix is collapsed to \, making the path invalid.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
latest
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
Screenshot of the VS Code error dialog shows:
"Path does not exist — The path '\UNRAID\appdata\' does not exist on this computer."
Note the single backslash prefix (\UNRAID) in the error message. The original working directory UNC path is \\UNRAID\appdata (double backslash). The extension's "Open in VS Code" button strips one backslash before passing the path to VS Code.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗