VS Code Remote SSH to Windows host without WSL fails: extension runs wsl.exe --status and crashes with ENOENT
What version of the IDE extension are you using?
Tested: - 26.422.30944 - 26.417.40842 - 26.415.20818 - 26.409.20454 - 26.406.31014 - 26.406.40811
What subscription do you have?
Plus
Which IDE are you using?
Visual Studio Code with Remote SSH
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
The Codex IDE extension cannot connect/use tools in a VS Code Remote SSH workspace where the remote host is Windows Server and WSL is not installed.
The extension appears to run wsl.exe --status during OS/local environment detection. Since WSL is not installed on the remote Windows host, wsl.exe does not exist and the extension fails before it can run basic commands.
Remote checks:
where.exe wsl -> INFO: Could not find files for the given pattern(s).
Test-Path C:\Windows\System32\wsl.exe -> False
Errors by version:
26.422.30944 -> spawnSync wsl.exe ENOENT
26.417.40842 -> spawnSync wsl.exe ENOENT
26.415.20818 -> spawnSync wsl.exe ENOENT
26.409.20454 -> spawnSync wsl.exe ENOENT
26.406.31014 -> local-environments is not supported in the extension
26.406.40811 -> local-environments is not supported in the extension
Example error:
[execWindowsCommand] command exception args=--status command=wsl.exe errorCode=ENOENT errorMessage="spawnSync wsl.exe ENOENT"
What steps can reproduce the bug?
- Use VS Code Remote SSH to connect to a Windows Server host.
- Ensure WSL is not installed on the remote host:
where.exe wslreturns not foundTest-Path C:\Windows\System32\wsl.exereturns False
- Install/enable the Codex IDE extension on the SSH remote.
- Open a remote workspace folder.
- Start Codex and ask it to run a basic command such as
hostnameorpwd.
The extension fails during local environment/OS detection before the command can run.
What is the expected behavior?
On a Windows Remote SSH host, the Codex IDE extension should use native Windows/PowerShell and should not require WSL.
If WSL is not installed, the extension should ignore/fallback instead of crashing with spawnSync wsl.exe ENOENT.
Additional information
This looks related to local environment / OS detection. Newer builds fail with wsl.exe ENOENT; older 26.406 builds are incompatible with the current UI because local-environments is not supported in the extension.
I also see a similar issue in Codex app SSH connection to Windows hosts, where it appears to try Linux/sh instead of Windows/PowerShell.