Repository navigation
Description
Testing #345466
Environment
- Windows x64, Code OSS 1.146.0 (Electron 43.8.3).
- Client and remote VS Code agent host built from
ccbfe2802f57d4bb69c478c7790c829ec486f75e. - Host type: Dev Tunnel to a Windows VS Code agent host, authenticated/private tunnel.
workbench.browser.enableRemoteProxy: true;workbench.browser.dataStorage: "default".- Isolated Code OSS profile. The dev product override supplies only the public tunnel authentication configuration from Insiders; no product source changes.
Steps to reproduce
- In the Agents window, open the new-session composer and select a remote host and folder A. Do not send the first message yet.
- Open the integrated browser from the session activity bar and navigate to a web app running only on that host's loopback interface, for example
http://127.0.0.1:43187/?case=draft. - Verify the page loads and the remote indicator says
Connected via <host>. - In the composer, change the workspace to another folder B on the same remote host. This also reproduces by choosing a previously used folder directly from the workspace picker's recent list.
- Send the first message.
Expected
The browser tab remains open, preserving its URL while following the draft's new folder/storage affinity. It is still available when the session starts, as specified by the TPI's new-session-composer scenario.
Actual
Changing the folder immediately removes the browser tab. Only the Files tab remains, and the native browser page is destroyed, not merely hidden behind another editor. Starting the session does not restore it.
Reproduced twice in opposite directions between two folders on the same source-built host. Before the switch, the tab loaded the correct remote HTML, scripts, image, API response, and WebSocket echo; after the switch, its URL was absent from the browser targets. Existing browser tabs belonging to already-started local and other remote sessions remained intact.
Activity
dmitrivMS commentedon Nov 2, 2026
Also reproduced the cross-host variant from #345466: start a draft on source-built host A with a folder and a working browser tab, switch the Environment picker directly to source-built host B, choose its folder, and send the first message. The new session has only Changes/Files; its original browser tab is not restored. In this variant, the old native page remains alive on host A but is absent from the editor tabs. Clicking the Browser activity-bar item creates a new blank tab rather than recovering the original URL. Both hosts are Windows over private Dev Tunnels, on the same commit above. Existing tabs belonging to already-started sessions remain correct.
dmitrivMS commentedon Nov 3, 2026
Also reproduced locally with WSL2 / Ubuntu 24.04.5 LTS (WSL 2.7.14, NAT), using Code OSS and a Linux source-built agent host at ccbfe28. A new draft in /root/tpi345466/main successfully browsed the WSL loopback app at http://127.0.0.1:43287/?case=wsl-folder-repro. Changing the draft folder to /root/tpi345466/other immediately left only the Files tab and destroyed that browser page. The already-started main session retained its existing browser page. Thus the folder-change regression is not specific to Dev Tunnels or Windows remote hosts.
Fix #345692: Preserve draft open editors when replacing new draft ses…