Fix VS Code Remote-WSL project root detection (issue #1032) - #1033
Open
daniel-vincent-veriforce wants to merge 2 commits into
Open
Fix VS Code Remote-WSL project root detection (issue #1032)#1033daniel-vincent-veriforce wants to merge 2 commits into
daniel-vincent-veriforce wants to merge 2 commits into
Conversation
daniel-vincent-veriforce
force-pushed
the
fix/vscode-remote-wsl-project-root
branch
from
August 4, 2026 12:23
c868008 to
cb8b8e5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What / Why / How
Fixes #1032.
When VS Code is launched from a shortcut on Windows and opens a remote WSL workspace,
VSCODE_CWDcan point to the local VS Code installation directory rather than the remote workspace. The VS Code Copilot adapter previously trusted that value and anchored project-boundary checks to the install directory, rejecting legitimate remote file reads.This change:
isVSCodeInstallPath()with cross-platform separator support for stable/Insiders Windows, macOS, and Linux install locations.CLAUDE_PROJECT_DIRas the highest-priority value.VSCODE_CWDand falls through toprocess.cwd().All paths and user names in the issue and tests are anonymized.
Affected platforms
Test plan
npm run typecheck— passed.npm test— 4,703 passed, 44 skipped.The lifecycle test-only timeout change addresses slow standalone bundle startup under WSL; no production lifecycle behavior was changed.
Checklist
npm testpassesnpm run typecheckpassesnextbranch