microsoft/WSL

“VS Code integrated terminal/extension fails to persist in WSL2 Ubuntu 24.04”

Closed this issue · 6 comments

Windows Version

Microsoft Windows 10 pro 19045.6332

WSL Version

2.6.1.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

6.6.87

Distro Version

Ubuntu 24.04

Other Software

Docker Desktop (Windows): version 3.2.2
traceroute: Version: 1:2.0.21-1
Visual Studio Code: 1.54.3 (latest as of Sep 2025)
Remote-WSL Extension: 0.104.2
Azure Resources Extension: 0.11.2 and 0.104.2
Node.js: v22.18.0 (via NVM)
Python: 3.11.7 (Anaconda), 3.13.7 (Azure CLI)
Azure CLI: 2.77.0
Gradle: 9.0.0
Java: OpenJDK 24.0.2 (Corretto)
MyCustomApplication: (if applicable, add details)

Repro Steps

Open VS Code on Windows, with WSL2 Ubuntu-24.04 as the default distribution.
Install and enable Azure Resources and Remote-WSL extensions.
Open a project folder in WSL2.
Attempt to launch the Azure Resources integrated terminal/cloud console.
Observe the error:
The terminal process "/home/franklindev_doo/.vscode-server/bin/0f0d87fa9e96c856c5212fc86db137ac0d783365/node '-e', 'require('/home/franklindev_doo/.vscode-server/extensions/ms-azuretools.vscode-azureresourcegroups-0.11.2/dist/cloudConsoleLauncher').main()'" terminated with exit code: 1.
Review logs in VS Code Output panel and WSL2.
Environment variables:

PATH includes Anaconda, Node.js, Java, Gradle, and system binaries.
SHELL is bash.
WSL_DISTRO_NAME is Ubuntu-24.04.

Expected Behavior

The Azure Resources extension should launch its integrated terminal/cloud console successfully.
The terminal session should persist and allow interaction with Azure resources.
No unexpected process termination or “Remote close” events.

Actual Behavior

The terminal process for the extension fails to persist.
Repeated “Remote close” events in VS Code logs.
Process terminates with exit code 1, no actionable error message.
VS Code server and extension host start and bind correctly, but the session closes immediately.
Terminal output and logs:
The terminal process ... terminated with exit code: 1.
[2025-09-19 18:37:39.344] Exec (14) stderr: Remote close
[2025-09-19 18:37:39.421] Exec (14) has terminated with status 0 and message undefined.
...

Diagnostic Logs

[Paste relevant log excerpts here, as above.]
[Attach screenshots if available.]
[Link to full logs or trace files if needed.]

Image

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise, please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The script will output the path of the log file once done.

If this is a networking issue, please use collect-networking-logs.ps1, following the instructions in Collect WSL logs for networking issues

Once completed please upload the output files to this GitHub issue.

See Collect WSL logs (recommended method).

If you choose to email these logs instead of attaching them to the bug, please send them to wsl-gh-logs@microsoft.com with the GitHub issue number in the subject, and include a link to your GitHub issue comment in the message body, and reply with '/emailed-logs'.

WSL diagnostic logs collected and attached as per instructions.

WslLogs-2025-09-19_12-41-44.zip

The log file doesn't contain any WSL traces. Please make sure that you reproduced the issue while the log collection was running.

Diagnostic information
Detected appx version: 2.6.1.0
Found no WSL traces in the logs

WSL diagnostic logs collected and attached as per instructions.

WslLogs-2025-09-19_13-00-34.zip

The log file doesn't contain any WSL traces. Please make sure that you reproduced the issue while the log collection was running.

Diagnostic information
Detected appx version: 2.6.1.0
Found no WSL traces in the logs

This issue has been automatically closed since it has not had any author activity for the past 7 days. If you're still experiencing this issue please re-file it as a new issue.

Thank you!