Skip to content

run_terminal_command fails with "spawn powershell.exe ENOENT" via SSH Remote from Windows #10462

@shanevcantwell

Description

@shanevcantwell

Before submitting your bug report

Relevant environment info

- OS: Windows 11 (host) → Ubuntu 24.04 (remote via SSH)
- Continue version: v1.3.31 pre-release
- IDE version: VS Code 1.96+ with Remote-SSH extension
- Model: nvidia/nemotron-3-nano-30b-a3b via LM Studio
- Connection: VS Code Remote-SSH to Linux host

Note

Filing this for searchability — this is the SSH Remote variant of #9661 (WSL) and #10007 (WSL/Dev Container). We reproduced it while testing tool overrides over an SSH tunnel and realized the scenario wasn't documented as its own issue. PR #10391 (already merged) fixes this, so this can be closed at your convenience. Apologies for the extra triage work — just wanted a findable record for anyone hitting this specific error via SSH Remote.

Description

When VS Code on Windows connects to a Linux host via SSH Remote, run_terminal_command fails immediately:

run_terminal_command failed with the message: spawn powershell.exe ENOENT

Root cause: extensionKind: ["ui", "workspace"] runs the Continue extension on the Windows host. getShellCommand() checks process.platform, gets "win32", and returns powershell.exe — but the command should execute on the remote Linux host where powershell.exe does not exist.

To reproduce

  1. Open VS Code on Windows
  2. Connect to a Linux host via Remote-SSH
  3. Open a workspace on the remote host
  4. In Continue chat, ask the model to run any terminal command (e.g., pwd)
  5. Observe: spawn powershell.exe ENOENT

Resolution

Fixed by #10391, which generalizes Windows remote detection to all remote types (WSL, SSH, Dev Container, Codespaces, tunnels):

const isWindowsHostWithRemote =
  process.platform === "win32" && !["", "local"].includes(ideInfo.remoteName);

When true, the implementation delegates to ide.runCommand() instead of spawning a local shell.

Related: #9661, #10007, #8826, #10433

Log output

run_terminal_command failed with the message: spawn powershell.exe ENOENT

Metadata

Metadata

Assignees

No one assigned

    Labels

    ide:vscodeRelates specifically to VS Code extensionkind:bugIndicates an unexpected problem or unintended behavioros:windowsHappening specifically on Windows

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions