Skip to content

IntelliJ: Windows → WSL remote not detected (only SSH detected) #9735

Closed as not planned

Description

@shanevcantwell

Description

When Windows IntelliJ connects to WSL, the extension does not detect this as a remote environment. Only SSH connections are detected.

Root Cause

In IntelliJIde.kt:145-148, remoteName is only set based on SSH environment variables:

var remoteName = "local"
if (sshClient \!= null || sshTty \!= null) {
    remoteName = "ssh"
}

WSL connections don't set these variables, so WSL is treated as "local" even though it's a remote Linux environment.

Impact

Any code that spawns processes based on platform detection will fail - same root cause as #9661 (VS Code) and #9151 (MCP servers).

Suggested Fix

Add WSL detection similar to the pattern used in PR #9679 for VS Code.

Related

Activity

  1. sestinj commented on Jan 21, 2026

    @sestinj
    Contributor

    Related issues:

  2. added
    ide:jetbrains
    kind:bug
    os:windows
    on Jan 21, 2026
  3. RomneyDa commented on Jan 26, 2026

    @RomneyDa
    Contributor

    @shanevcantwell was this fixed by one of these?
    #9810
    #9740

  4. shanevcantwell commented on Jan 27, 2026

    @shanevcantwell
    ContributorAuthor

    Analysis shows:
    PR #9810 only touched CLI files (extensions/cli/src/tools/)
    PR #9740 only touched core MCP files (core/context/mcp/)
    Neither touched IntelliJ code (extensions/intellij/ or the Kotlin files).

    I'll take a look now.

  5. shanevcantwell commented on Jan 27, 2026

    @shanevcantwell
    ContributorAuthor

    This was based on a code pattern that related to those two bugs. In trying to repro in IntelliJ, I saw that the extension there has the same problem as VSCode: Issue #4691

    Because the state across windows is shared, not uniwue, if I have two windows open in VSCode (and I typically have at least that many), and they mix wsl and native Windows, the lack of state isolation across IntelliJ or VSCode windows makes the Continue extension not know whether to serve up wsl or powershell. This problem is the same in IntelliJ. as in VSCode. (though not cross-product)

    Look at this image. The left window I opened explicitly through wsl, and IntelliJ's terminal gives me a *nix terminal and path. In the extension, my rnj-1 model here is showing the current folder through Powershell path (which is the pattern #9810 and #9740 fixed and predicted for here: powershell when in wsl Ubuntu). In the right window I started a new project on the DOS side and ran pwd again through the extension.

    Image

    Below is upon opening a 3rd window, now through wsl again. The image shows: before opening a file, it still thinks it's in window 2. Once I open a file through that wsl window, though, the extension returns to the original powershell::wsl shell and path.

    Image
  6. github-actions commented on May 27, 2026

    @github-actions
    Contributor

    This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.

  7. github-actions commented on Jun 7, 2026

    @github-actions
    Contributor

    This issue was closed because it wasn't updated for 10 days after being marked stale. If it's still important, you are welcome to leave a comment and this will keep the issue open. However please note that this repo is no longer being actively maintained.

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

Metadata

Metadata

Assignees

Labels

ide:jetbrainskind:bugos:windowsstale

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions