Repository navigation
Description
Does this issue occur when all extensions are disabled?: Not tested.
- VS Code Version: 1.145.0-insider
- Commit: caeec36
- Build date: 2026-10-30
- OS Version: Windows 11 x64, 10.0.26200
- Affected surface: Agents window
Summary
The Agents window repeatedly hangs at startup while synchronously restoring a large cached cloud-sandbox inventory. The captured unresponsive-window samples point to account restoration, per-environment provider registration, observable updates, and session-list rebuilding on the renderer thread.
This appears distinct from the excess discovery requests tracked in #345234: the sampled stall is in local cached-inventory restoration, before that restoration finishes.
Steps to reproduce
- Use an account with a large persisted cloud-sandbox session inventory. The affected window logged 1,750 restored cached sandbox entries.
- Launch or reopen the Agents window with cloud sandboxes enabled.
- Wait for authentication/account restoration.
- Observe that the window becomes unresponsive while registering the cached session providers.
This was captured in the affected installation; a clean-profile/minimal reproduction has not been performed.
Expected
Restoring session history should not block window interaction for tens of seconds. Large inventories should be restored with bounded renderer work and batched UI/provider updates.
Actual and captured evidence
Two successive window instances in one application run both performed large bursts of provider registration:
| Window | Unique cloud-sandbox providers registered |
|---|---|
| window1 | 1,420 |
| window2 | 1,510 |
These are unique environment IDs within each window, not simply repeated registration of one provider. Counts were captured during diagnosis.
Relevant local timestamps on November 1, 2026:
20:08:50.410 [error] CodeWindow: detected unresponsive
20:09:02.373 [error] CodeWindow unresponsive samples: ... Total Samples: 11
20:09:22.828 [error] CodeWindow: detected unresponsive
20:09:38.761 [info] [CloudSandboxAgentHost] Restored 1750 cached sandbox environment(s).
20:09:38.915 [error] CodeWindow: recovered from unresponsive
The second unresponsive report included 14 samples. Its recovery was logged immediately after cached inventory restoration completed.
Representative sampled stack, with the local installation path removed:
Map.delete
disposeElement
...
setChildren
Fg.update
Fg.refresh
...
CJt._onProvidersChanged
...
szt._fireDidChangeProviders
szt.registerSessionBackend
Jue._createProvider
Jue._ensureProvider
Jue._seedDiscoveredSession
Jue._restoreAccount
...
Rxt._onAuthenticationChanged
Other samples include _rewatchProviders, observable recomputation, and session/UI updates under the same registration/restoration chain.
The extension host was running, and the machine had approximately 55 GB free out of 94 GB RAM during diagnosis. The captured evidence points to renderer-thread work rather than system memory exhaustion.
Suspected implementation issue
Inspection of the installed out/vs/sessions/sessions.desktop.main.js bundle shows _restoreAccount iterating stored inventory keys and calling _seedDiscoveredSession synchronously for each entry, without yielding. _seedDiscoveredSession ensures a provider and seeds sessions. Provider registration fires provider-change events; the sampled downstream path refreshes the session list and its tree.
Relevant locations in this exact build:
_restoreAccount: bundle line 4905, column 9734._seedDiscoveredSession: bundle line 4905._onProvidersChanged: bundle line 4995.- Sampled session-list refresh/tree work: bundle line 4848.
The evidence suggests repeated synchronous provider registration and downstream UI refreshes scale poorly with large cached inventories. Exact complexity and a source-level fix have not been verified.
Potential areas to investigate: batch provider/session notifications during restoration, coalesce session-list refreshes, and yield between bounded restoration chunks.
Workaround status
The installed code gates this feature on chat.agentHost.cloudSandbox.enabled. Disabling it may avoid this restoration path, at the cost of cloud-sandbox functionality. This workaround has not been applied or tested.
Full logs are not attached because they contain private session/account information. The evidence above omits account identifiers, environment/session IDs, authentication data, and local user paths.
Activity
[Perf] sessions: defer cloud task resolution (Written by Copilot)
alexdima commentedon Nov 16, 2026
This should be fixed on current Insiders (1.147.0, 944d79c), by two commits:
I checked it on main (a389cd7) with the startup-inventory test. I ran it as written (150 cached entries) and scaled to your 1,750 entries. Both pass in under a second, with a single provider-change event, no session-resolution events and no per-environment providers created.
I don't have an account with a large cloud inventory, so I couldn't try it hands-on. Closing for now; please reopen if the window still hangs at startup on a current Insiders.
🤖 Authored with GitHub Copilot on behalf of Alexandru Dima (@alexdima).