[BUG]: Claude Code VS Code Extension Crashes on Windows When a GitHub Virtual Filesystem Workspace Is Open

Open 💬 0 comments Opened Jun 16, 2026 by gregsowell

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?

Bug Report: Claude Code VS Code Extension Crashes on Windows When a GitHub Virtual Filesystem Workspace Is Open

Summary

The Claude Code VS Code extension panel fails to load ("An error occurred while loading view: claudeVSCodeSessionsList") on Windows whenever a GitHub virtual filesystem workspace (vscode-vfs://github/...) is open in VS Code. The root cause is that the extension stores only the path portion of the VFS URI in its IDE lock file, which Windows incorrectly resolves as a relative path off the current drive root.

Environment

  • OS: Windows 10/11
  • VS Code: v1.124
  • Claude Code VS Code extension: v2.1.178
  • Claude Code CLI: v2.1.170

Result: The panel shows: "An error occurred while loading view: claudeVSCodeSessionsList"

Expected: The panel loads normally.

Root Cause

When a vscode-vfs://github/gregsowell/ansible-misc workspace is open, the Claude Code extension writes an IDE lock file to %USERPROFILE%\.claude\ide\<pid>.lock containing:

{
  "pid": 9964,
  "workspaceFolders": ["\\gregsowell\\ansible-misc"],
  ...
}

The extension stores only the path component of the URI (\gregsowell\ansible-misc), discarding the scheme (vscode-vfs://) and authority (github).

On Windows, a path beginning with \ but no drive letter is treated as relative to the current drive root. Node.js fs.realpathSync / lstat prepends the current drive letter, resolving \gregsowell\ansible-misc to C:\gregsowell\ansible-misc. The parent directory C:\gregsowell does not exist, so the call throws:

ERR ENOENT: no such file or directory, lstat 'C:\gregsowell'

This error propagates up through R4.resolveSessionListView and crashes the entire extension panel.

Workaround

  1. Close the GitHub VFS workspace in VS Code (File → Close Folder).
  2. Delete any stale lock files:

``
del "%USERPROFILE%\.claude\ide\*.lock"
``

  1. Restart VS Code.

The panel will load correctly as long as no vscode-vfs:// workspace is open.

Suggested Fix

In the extension's lock file writer and session list resolver, vscode-vfs:// (and other non-file:// URI scheme) workspace folders should be detected and either:

  • Skipped entirely when resolving local paths (preferred), or
  • Stored as the full URI string and gracefully handled downstream (filtered out of any local fs calls).

A simple guard before any lstat / realpathSync call would prevent the crash:

// Pseudocode
if (!workspaceFolder.startsWith('file://') && path.isAbsolute(workspaceFolder)) {
  // Only attempt fs operations on real local paths
}

The fix should handle all non-local URI schemes (vscode-vfs://, ssh://, devcontainer://, etc.) to be robust across VS Code's remote workspace features.

What Should Happen?

The Claude Code VS Code extension panel should load normally regardless of whether a GitHub virtual filesystem workspace (vscode-vfs://github/...) is open in VS Code. The extension should gracefully skip or ignore non-local URI schemes when resolving workspace paths, rather than crashing the entire panel.

Error Messages/Logs

Error: An error occurred while loading view: claudeVSCodeSessionsList

ERR ENOENT: no such file or directory, lstat 'C:\gregsowell'
  at R4.resolveSessionListView

Root cause: Extension stores vscode-vfs://github/gregsowell/ansible-misc workspace
as \gregsowell\ansible-misc in the IDE lock file (%USERPROFILE%\.claude\ide\<pid>.lock),
stripping the scheme and authority. On Windows, Node.js fs.realpathSync prepends the
current drive letter, resolving \gregsowell\ansible-misc to C:\gregsowell\ansible-misc.
The parent C:\gregsowell does not exist → ENOENT → panel crash.

Steps to Reproduce

Steps to Reproduce

  1. Open VS Code.
  2. Open a GitHub repository using the VS Code virtual filesystem (e.g., via the "Open in VS Code" button on github.com, or by opening a vscode-vfs://github/<user>/<repo> URI).
  3. Install or enable the Claude Code VS Code extension.
  4. Open the Claude Code panel in the sidebar.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.170 (Claude Code) (CLI) / VS Code extension v2.1.178

Platform

Other

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗