Skip to content

runTerminalCommand fails with "spawn powershell.exe ENOENT" when VS Code on Windows host connects to WSL2/Dev Container - Continue extension ignores container environment #10007

Description

@winguru

Before submitting your bug report

Relevant environment info

- OS: Windows 11 with WSL2
- Continue version: 1.3.30
- IDE version: VSCode 1.108.2
- Model: Z.AI GLM 4.7
- config: https://www.continue.dev/geoff-thornton/vscode-zai

Description

Environment

Component Version/Detail
OS Windows 11 Build 26100
VS Code 1.108.2
Continue Extension 1.3.30
Remote WSL2 / Docker Dev Container
Dev Container OS Linux
Node.js 22.21.1
Shell in Container bash 5.2.37(1)-release
Electron 39.2.7 (Build 12953945)
Chromium 142.0.7444.235
V8 14.2.231.21-electron.0

Confirmed Environment Variables

Dev Container Detection (Present):

REMOTE_CONTAINERS="true"
REMOTE_CONTAINERS_IPC="/tmp/vscode-remote-containers-ipc-..."
REMOTE_CONTAINERS_SOCKETS="[\"/tmp/.X11-unix/X2\"]"
SHELL="/bin/bash"
PWD="/app"

Continue Extension Environment (Missing):

CONTINUE_DEV_MODE=""                       # Not set
CONTINUE_TELEMETRY_ENABLED=""                # Not set
VSCODE_REMOTE_CONTAINERS_SESSION=""        # Not set
VSCODE_REMOTE_SERVER=""                    # Not set
VSCODE_REMOTE_USER=""                    # Not set

Description

runTerminalCommand tool fails with error when Continue VS Code extension is installed on local Windows machine and tries to execute commands in a WSL2/Dev Container environment:

run_terminal_command failed with message: spawn powershell.exe ENOENT

Please try something else or request further instructions.```

### To reproduce

Ask the Continue agent to run a terminal script:

```I'm trying to debug an AI agent tool to run commands in a terminal.  Can you request to run a harmless command like "echo Hello, world!"```

<img width="470" height="211" alt="Image" src="https://github.com/user-attachments/assets/ea8473f0-a7f4-4e72-9194-b8ec0274f720" />

The agent (GLM 4.7) thinks about the request and then generates a `run_terminal_command` request:

<img width="468" height="297" alt="Image" src="https://github.com/user-attachments/assets/3ae82898-2bc1-46e9-b72e-53e7c22a6415" />

Clicking on "Run" sends the command to the VSCode terminal window properly, but if you try to "Accept" the request to run the command, you get the following error:

<img width="462" height="170" alt="Image" src="https://github.com/user-attachments/assets/d8289314-cc27-4a1f-a388-f16ddb0a7146" />

run_terminal_command failed with message: spawn powershell.exe ENOENT

Please try something else or request further instructions.```

vscode-app-1769700491328.log

Log output

I'm not sure what logs are revelant, so I saved the entire console log and attached the file above.

Activity

  1. sestinj commented on Jan 29, 2026

    @sestinj
    Contributor

    Related issues:

    This appears to be a continuation of the same class of issues where the extension doesn't properly detect remote environments (WSL/Dev Containers) and attempts to use Windows shell executables in Linux environments.

  2. added
    ide:vscode
    kind:bug
    os:windows
    on Jan 29, 2026
  3. winguru commented on Jan 29, 2026

    @winguru
    Author

    I've tried various workarounds with no success, but admittedly am relatively new to debugging VSCode extension issues. Please let me know if I can provide any more information or can otherwise help with running tests. I'm on your Discord server as @WinGuru.

  4. csubhodeep commented on Feb 7, 2026

    @csubhodeep

    I am facing the same problem

    Image

    Could anyone PLEASE suggest a temporary workaround? 😢

    Specs:

    Version: 1.109.0 (Universal)
    Commit: bdd88df003631aaa0bcbe057cb0a940b80a476fa
    Date: 2026-02-04T02:01:38.288Z
    Electron: 39.3.0
    ElectronBuildId: 13168319
    Chromium: 142.0.7444.265
    Node.js: 22.21.1
    V8: 14.2.231.22-electron.0
    Dev Container OS: Darwin arm64 25.2.0
    Dev Container Image: mcr.microsoft.com/vscode/devcontainers/python:3.10-bullseye
    Host OS: MacOS 26.2 (25C56)

    P.S. it works fine when I open a new VSCode window from the host OS directly i.e. not inside the dev container.

  5. added a commit that references this issue on Feb 10, 2026
    b7c2b4f
  6. shanevcantwell commented on Feb 10, 2026

    @shanevcantwell
    Contributor

    I've been swatting these one at a time, but the pattern should be knocked out with this fix.

  7. alvarovm commented on Feb 13, 2026

    @alvarovm

    Same problem for remote commands in Linux Mint and mac os:
    run_terminal_command failed with the message: spawn /bin/bash ENOENT

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

Metadata

Metadata

Assignees

Labels

ide:vscodekind:bugos:windows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions