Skip to content

Conversation

@shanevcantwell
Copy link
Contributor

@shanevcantwell shanevcantwell commented Jan 21, 2026

Summary

  • Fixes MCP servers failing to start with cmd.exe not found when Windows VS Code connects to WSL
  • Root cause: resolveCommandForPlatform() wrapped batch commands (npx, uvx, etc.) with cmd.exe even when connected to WSL remote
  • Solution: Add isWindowsHostWithWslRemote check (same pattern as PR fix: use ide.runCommand when Windows host connects to WSL #9679)

Fixes #9151

Test plan

  • Unit tests for all scenarios (WSL remote, local Windows, Linux, non-batch commands)
  • Manual test: Configure MCP server (e.g., filesystem) in WSL workspace, verify it connects
  • I'm not sure why CI is consistently timing out on building the win32-64, because that binary also shows up as a completed artifact in the CI failure message I'm sent.

Related PRs

🤖 Generated with Claude Code


Continue Tasks: ▶️ 2 queued — View all


Summary by cubic

Fixes MCP servers failing to start in WSL when VS Code on Windows connects to WSL by not wrapping batch commands with cmd.exe. WSL is now detected so Linux commands run directly.

  • Bug Fixes

    • Skip cmd.exe wrapping on Windows hosts when remoteName is "wsl".
    • Added unit tests for WSL remote, local Windows, Linux, and non-batch commands.
  • Refactors

    • Made resolveCommandForPlatform async to query IDE info.

Written for commit 74095d9. Summary will update on new commits.

… to WSL

Fixes continuedev#9151

When Windows VS Code connects to WSL, MCP servers failed to start with
"cmd.exe not found" because resolveCommandForPlatform() wrapped batch
commands (npx, uvx, etc.) with cmd.exe even when the remote is WSL.

Changes:
- Make resolveCommandForPlatform() async to fetch IDE info
- Add isWindowsHostWithWslRemote check (same pattern as PR continuedev#9679)
- Skip cmd.exe wrapping when remoteName === "wsl"
- Add tests for WSL, local Windows, Linux, and non-batch scenarios

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@shanevcantwell shanevcantwell requested a review from a team as a code owner January 21, 2026 08:32
@shanevcantwell shanevcantwell requested review from RomneyDa and removed request for a team January 21, 2026 08:32
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jan 21, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Copy link
Collaborator

@RomneyDa RomneyDa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix!

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Jan 26, 2026
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 26, 2026
@RomneyDa RomneyDa merged commit 68a0e4b into continuedev:main Jan 26, 2026
55 of 57 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Jan 26, 2026
@github-actions github-actions bot locked and limited conversation to collaborators Jan 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Continue VS Code extension fails to start MCP servers in WSL workspaces (looks for cmd.exe inside Ubuntu)

2 participants