You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Sandbox profiles: concurrent windows can lose a host's last-known profile assignment #350028
All windows on a machine share the saved list of each remote host's last-known sandbox profile (chat.sandboxProfileAssignments.v1, APPLICATION_SHARED). rememberSandboxProfileAssignment in src/vs/platform/agentHost/common/sandboxProfiles.ts reads the whole list from the window's cached storage, changes one entry and writes the whole list back.
Each window's cache only sees other windows' writes after they propagate. When two windows record different hosts before either sees the other's write, the second write replaces the list and drops the other host's entry.
Steps to reproduce
Open two windows on the same machine that show different remote hosts in Remote Environments, for example host A in window 1 and host B in window 2, each with a sandbox profile assigned.
Have both windows record their host's assignment at about the same time, before shared storage propagates between them (for example, both connect at once).
Disconnect the host whose entry was written first.
Expected
The disconnected host shows its last-known sandbox profile, disabled, and that profile can't be deleted in Manage Sandbox Profiles.
It corrects itself the next time a window shows that host connected.
Suggested fix
Update the list with IStorageService.compareAndSwapApplicationSharedValue, retrying against the current value, so concurrent updates to different hosts merge instead of overwriting each other. Add a test with two independent window caches and delayed propagation.
Activity