Preserve unread state across remote host disconnect#318267
Merged
roblourens merged 3 commits intoMay 26, 2026
Merged
Conversation
Avoid reporting cached remote agent host sessions as removed when a host is temporarily unpublished during disconnect/reconnect. Re-announce cached sessions when the host reconnects so the sessions list refreshes without treating the outage as deletion. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…t-agent-host-sessions-maybe-especi-1140f5fe
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts the remote agent host sessions provider so temporary remote disconnects don’t get treated as real session deletions, preserving local UI state (notably unread/pin) while still refreshing the sessions list correctly on reconnect.
Changes:
- Stop reporting cached remote sessions as “removed” when a remote host is temporarily unpublished; instead hide them while keeping the cache.
- On reconnect after being unpublished, re-announce cached sessions so the sessions list refreshes without a delete/re-add cycle.
- Update documentation and remote provider tests to reflect the new disconnect/reconnect semantics.
Show a summary per file
| File | Description |
|---|---|
| src/vs/sessions/SESSIONS_LIST.md | Documents cleanup semantics for pin/read state vs. true removals and remote disconnect hiding behavior. |
| src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/remoteAgentHostSessionsProvider.test.ts | Updates tests to assert that unpublish hides sessions without “removed” events, and reconnect re-announces sessions. |
| src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHostSessionsProvider.ts | Tracks unpublished state across reconnect and changes unpublish behavior to avoid removal events. |
| src/vs/sessions/contrib/providers/agentHost/browser/baseAgentHostSessionsProvider.ts | Extends refresh logic to optionally re-announce existing cached sessions as “added” on reconnect. |
Copilot's findings
- Files reviewed: 4/4 changed files
- Comments generated: 2
Report updated cached sessions as changed when re-announcing them after a remote reconnect, and fix the sessions list documentation grammar. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
DonJayamanne
approved these changes
May 26, 2026
anthonykim1
added a commit
that referenced
this pull request
May 26, 2026
Squashed cherry-pick of 10 commits from main that are included in the Insiders build (183159e) people are verifying: - agentHost: show fetched URL for web_fetch (#318240) - Fix SSH remote agent host passphrase auth (#318244) - agentHost: add setting to disable worktreeCreated task auto-dispatch (#318243) - Agent host: clearer worktree git timeout errors and 60s budget (#318242) - Normalize LF to CRLF in agent host terminal tool output (#318257) - sessions: restore X-button removal of SSH remote agent host entries (#318262) - chat: fix duplicate command registration for agent-host-copilotcli (#318273) - launch: build copilot in compile; wait for CDP in launch.sh (#318272) - Preserve unread state across remote host disconnect (#318267) - Add more codenotify for terminal (#318285)
dileepyavan
pushed a commit
that referenced
this pull request
May 27, 2026
Squashed cherry-pick of 10 commits from main that are included in the Insiders build (183159e) people are verifying: - agentHost: show fetched URL for web_fetch (#318240) - Fix SSH remote agent host passphrase auth (#318244) - agentHost: add setting to disable worktreeCreated task auto-dispatch (#318243) - Agent host: clearer worktree git timeout errors and 60s budget (#318242) - Normalize LF to CRLF in agent host terminal tool output (#318257) - sessions: restore X-button removal of SSH remote agent host entries (#318262) - chat: fix duplicate command registration for agent-host-copilotcli (#318273) - launch: build copilot in compile; wait for CDP in launch.sh (#318272) - Preserve unread state across remote host disconnect (#318267) - Add more codenotify for terminal (#318285)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation