Does this issue occur when all extensions are disabled?: No
- VS Code Version: 1.107.1
- OS Version: windows11
Description
When using Visual Studio Code with the Remote-SSH extension to connect to a Linux remote host, the $PATH environment variable in the integrated terminal becomes corrupted. This specifically breaks the code command from the VSCode Server CLI, preventing it from opening files on the local machine.
The root cause is that the GitHub Copilot Chat extension incorrectly injects a local Windows-style file path (e.g., c:\Users...) into the remote shell's $PATH. Crucially, this path is terminated with a Windows path separator (;).
Since Linux shells use a colon (:) as the path separator, the entire injected string (including the semicolon and the segment before the next actual colon) is interpreted as a single, invalid directory name. This corrupts the first path entry and, in the common case where the VSCode CLI path immediately follows, renders the code command unusable.
Steps to Reproduce:
- Have the GitHub Copilot Chat extension installed and enabled locally.
- Connect to a Linux remote machine (e.g., Ubuntu) via Remote-SSH.
- Open an integrated terminal in the remote VSCode window.
- Run echo $PATH and observe the output.
- Run type -a code to see which code command is resolved.
Does this issue occur when all extensions are disabled?: No
Description
When using Visual Studio Code with the Remote-SSH extension to connect to a Linux remote host, the $PATH environment variable in the integrated terminal becomes corrupted. This specifically breaks the code command from the VSCode Server CLI, preventing it from opening files on the local machine.
The root cause is that the GitHub Copilot Chat extension incorrectly injects a local Windows-style file path (e.g., c:\Users...) into the remote shell's $PATH. Crucially, this path is terminated with a Windows path separator (;).
Since Linux shells use a colon (:) as the path separator, the entire injected string (including the semicolon and the segment before the next actual colon) is interpreted as a single, invalid directory name. This corrupts the first path entry and, in the common case where the VSCode CLI path immediately follows, renders the code command unusable.
Steps to Reproduce: