Skip to content

Terminal output not captured when Windows VS Code connects to WSL (follow-up to #9679) #9731

Closed

Description

@shanevcantwell

Before submitting your bug report

  • I've tried using the "Ask AI" feature on the Continue docs site
  • I'm not able to find a related conversation on GitHub discussions
  • I'm not able to find an open issue that reports the same bug
  • I've seen the troubleshooting guide on the Continue Docs

Relevant environment info

Description

This is a follow-up to #9679 which fixed the spawn powershell.exe ENOENT error when Windows VS Code connects to WSL.

Background:

Current behavior:
The fix in #9679 successfully prevents the spawn error, but ide.runCommand() only sends text to VS Code's terminal via terminal.sendText() - it cannot capture output. The command executes successfully (visible in terminal), but Continue receives:

Terminal output not available. This is only available in local development environments and not in SSH environments for example.

Proposed solution:
For the isWindowsHostWithWslRemote case, instead of falling through to ide.runCommand(), spawn wsl.exe from Windows to execute commands in WSL with output capture:

if (isWindowsHostWithWslRemote) {
  // Use wsl.exe to spawn into WSL and capture output
  const shell = "wsl.exe";
  const args = ["-e", "bash", "-l", "-c", command];
  // ... rest of spawn logic with output capture
}

This allows the Windows extension host to execute commands in WSL while still capturing stdout/stderr.

To reproduce

  1. Install Continue extension on Windows (LOCAL, not WSL)
  2. Connect VS Code to WSL
  3. Ask Continue to run a terminal command (e.g., "What folder are we in?")
  4. Command runs visibly in terminal but Continue shows "Terminal output not available"

Related issues

Activity

  1. sestinj commented on Jan 21, 2026

    @sestinj
    Contributor

    Related issues:

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

    @shanevcantwell
    ContributorAuthor

    WSL Support Dependencies

    Fixing terminal output capture for WSL is part of a broader set of Windows+WSL detection issues. Here are the related bugs that share the same root cause pattern:

    Already Open

    New Issues (opened as dependencies)

    Root Cause

    All these issues stem from extensionKind: ["ui", "workspace"] causing the extension to run on Windows while the workspace is in WSL. Code that checks process.platform gets "win32" but needs to execute in a Linux context.

    The Pattern

    PR #9679 established the fix pattern:

    const isWindowsHostWithWslRemote =
      process.platform === "win32" && ideInfo.remoteName === "wsl";

    This pattern should be applied consistently across all process spawning code paths.

  4. miks2021 commented on Feb 10, 2026

    @miks2021

    The issue is falsely claimed to be closed by #9810, however #9810 resolved it for cli only, not for vscode extension. I am still experiencing the same error on Continue for vscode v1.3.30
    @RomneyDa @uinstinct

  5. shanevcantwell commented on Feb 10, 2026

    @shanevcantwell
    ContributorAuthor

    This should actually be linked to PR #9679, which is merged for release 1.40.0, and not #9810.

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

Metadata

Metadata

Assignees

No one assigned

    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