Skip to content

fix: generalize Windows remote detection for terminal commands - #10391

Merged
RomneyDa merged 1 commit into
continuedev:mainfrom
shanevcantwell:fix/windows-remote-terminal-command
Feb 11, 2026
Merged

RomneyDa merged 1 commit into
continuedev:mainfrom
shanevcantwell:fix/windows-remote-terminal-command

Conversation

@shanevcantwell

@shanevcantwell shanevcantwell commented Feb 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Broadens the Windows-with-remote check in runTerminalCommand.ts from WSL-only (remoteName === "wsl") to all non-local remotes (!["", "local"].includes(remoteName))
  • When a Windows host connects to any remote workspace (Dev Container, SSH, Codespaces, etc.), terminal commands now correctly fall back to ide.runCommand() instead of trying to spawn powershell.exe
  • Follows the same pattern established in PR fix: use ide.runCommand when Windows host connects to WSL #9679 (WSL terminal fix, merged in v1.8.0)

Context

The ENABLED_FOR_REMOTES list already includes dev-container, devcontainer, ssh-remote, attached-container, codespaces, and tunnel — but the guard only excluded WSL from direct exec. Any other remote type on a Windows host would enter the direct spawn path and fail with ENOENT because powershell.exe args target the wrong platform.

Fixes #10007
Related: #10067, #9812, #8732

Test plan

  • Verify terminal tool works on Windows host → WSL remote (existing behavior preserved)
  • Verify terminal tool works on Windows host → Dev Container (no longer ENOENT)
  • Verify terminal tool works on local Windows (direct exec still used)
  • Verify terminal tool works on native Linux/macOS (no change)

🤖 Generated with Claude Code


Summary by cubic

Generalized Windows remote detection in runTerminalCommand to handle all non-local remotes. On Windows with a remote workspace, terminal commands now use ide.runCommand instead of spawning powershell, preventing ENOENT errors across Dev Containers, SSH, Codespaces, etc.

  • Bug Fixes
    • Detect any non-local remote on Windows and route commands through VS Code to run in the remote environment.
    • Preserve direct spawn on local Windows; no changes on macOS/Linux.

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

Broadens the Windows-with-remote check from WSL-only to all non-local
remotes (Dev Container, SSH, Codespaces, etc.) so that terminal commands
fall back to ide.runCommand() instead of trying to spawn powershell.exe.

Fixes continuedev#10007

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@shanevcantwell
shanevcantwell requested a review from a team as a code owner February 10, 2026 15:02
@shanevcantwell
shanevcantwell requested review from sestinj and removed request for a team February 10, 2026 15:02
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Feb 10, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Feb 11, 2026
@RomneyDa
RomneyDa merged commit b81f321 into continuedev:main Feb 11, 2026
79 of 83 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 11, 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:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

2 participants