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

Status Task Actions
▶️ Queued Update docs on PR View

Powered by Continue


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 <noreply@anthropic.com>
@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: Todo

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)

1 participant