[BUG] Claude Code extension crashes with virtual filesystem repos (vscode-vfs://)
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 opening a GitHub repository using VS Code's virtual filesystem (vscode-vfs://), the Claude Code extension fails to load with the error An error occurred while loading view: claudeVSCodeSessionsList.
Steps to reproduce:
Open a GitHub repository directly in VS Code via the virtual filesystem (without cloning locally)
Claude Code extension attempts to initialize
Extension crashes
Error:
ENOENT: no such file or directory, lstat 'C:\<github-username>'
at Object.realpathSync (node:fs:2805:29)
at XX.resolveSessionListView (extension.js)
Root cause: The extension calls realpathSync on the workspace folder path, which fails because vscode-vfs://github/<user>/<repo> is a virtual path with no real filesystem backing — it cannot be resolved as a local path on Windows.
Expected behavior: The extension should detect virtual filesystem workspaces and handle them gracefully instead of crashing.
Environment:
OS: Windows
VS Code with virtual filesystem GitHub repo
Claude Code extension v2.1.143
What Should Happen?
The extension should detect that the workspace is a virtual filesystem path (vscode-vfs://) and either display a graceful message informing the user that virtual filesystem repositories are not currently supported, or function normally if virtual FS support is implemented.
Error Messages/Logs
WARN Ignoring the error while validating workspace folder vscode-vfs://github/[username]/[repo] - ENOPRO: No file system provider found for resource 'vscode-vfs://github/[username]/[repo]'
ERR ENOENT: no such file or directory, lstat 'C:\[username]': Error: ENOENT: no such file or directory, lstat 'C:\[username]'
at Object.realpathSync (node:fs:2805:29)
at XX.resolveSessionListView (extension.js:822:16781)
at Object.resolveWebviewView (extension.js:882:6110)
Steps to Reproduce
Open a GitHub repository directly in VS Code via the virtual filesystem (without cloning locally)(Github Repos Extension)
Claude Code extension attempts to initialize
Extension crashes
or
Open Claude Code extension and sign in
Open a GitHub repository directly in VS Code via the virtual filesystem (without cloning locally)(Github Repos Extension)
Extension crashes
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
14,179,768
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗