Skip to content

Conversation

@shanevcantwell
Copy link
Contributor

@shanevcantwell shanevcantwell commented Jan 19, 2026

Summary

  • Fixes spawn powershell.exe ENOENT error when Windows VS Code connects to WSL remote
  • Detects Windows+WSL scenario and falls back to ide.runCommand() instead of direct spawn

Problem

When the VS Code extension runs on Windows (process.platform === "win32") but connects to a WSL remote (ideInfo.remoteName === "wsl"), the terminal command tool tries to spawn powershell.exe which doesn't exist in the WSL context.

Solution

Added detection for this specific scenario to fall through to the ide.runCommand() path, letting VS Code's integrated terminal handle the remote execution properly.

Test plan

Fixes #9661

🤖 Generated with Claude Code


Continue Tasks: ▶️ 2 queued — View all


Summary by cubic

Fixes command execution when VS Code runs on Windows but connects to a WSL remote by routing commands through ide.runCommand instead of spawning a Windows shell. Prevents “spawn powershell.exe ENOENT” and lets VS Code run commands in WSL.

  • Bug Fixes
    • Detect Windows host + WSL remote and skip direct shell spawn.
    • Use ide.runCommand for remote execution in this case; added unit test.

Written for commit ce0602e. Summary will update on new commits.

When the VS Code extension runs on Windows but connects to WSL,
direct shell spawning fails because process.platform is "win32"
but commands should execute in the Linux WSL environment.

This caused: spawn powershell.exe ENOENT

The fix detects this scenario and falls back to ide.runCommand(),
letting VS Code handle the remote terminal execution properly.

Fixes continuedev#9661

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@shanevcantwell shanevcantwell requested a review from a team as a code owner January 19, 2026 21:06
@shanevcantwell shanevcantwell requested review from Patrick-Erichsen and removed request for a team January 19, 2026 21:06
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jan 19, 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.

Great fix for the terminal tool

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Jan 20, 2026
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 20, 2026
@RomneyDa RomneyDa merged commit 754434d into continuedev:main Jan 20, 2026
57 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Jan 20, 2026
@github-actions github-actions bot locked and limited conversation to collaborators Jan 20, 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:M This PR changes 30-99 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

VSCode: spawn powershell.exe ENOENT

2 participants