Skip to content

agentHost: preserve remote sessions across reload - #333251

Draft
roblourens wants to merge 2 commits into
mainfrom
roblou/agents/fix-copilot-session-reload-issue
Draft

agentHost: preserve remote sessions across reload#333251
roblourens wants to merge 2 commits into
mainfrom
roblou/agents/fix-copilot-session-reload-issue

Conversation

@roblourens

Copy link
Copy Markdown
Member

Summary

  • preserve already client-addressed working directory URIs returned by listSessions
  • keep remote workspace filtering consistent between live session notifications and reload restoration
  • add regression coverage for the live-notification to cold-listing transition

Root cause

Remote SSH sessions are announced with vscode-remote: working directories. The cold listSessions path wrapped those URIs again as vscode-agent-host:, so workspace filtering excluded the session after window reload even though it still existed in the Agent Host.

Validation

  • npm run compile
  • npm run typecheck-client
  • targeted ESLint
  • related AgentHostProtocolClient listSessions tests
  • confirmed the regression test fails with the old mapping and passes with this change

(Written by Copilot)

Keep non-file working directory URIs returned by listSessions in client space so remote workspace filtering treats live and restored sessions consistently.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings August 28, 2026 20:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

Review tier: Balanced
Findings: None

What changed in this PR

Preserves remote session visibility after reload by avoiding double-wrapping client-addressed URIs.

Changes:

  • Maps only host-local file: URIs into client space.
  • Adds regression coverage for live notifications and restored listings.
File Description
agentHostProtocolClient.ts Preserves non-file session and project URIs.
agentHostProtocolClient.test.ts Tests remote URI preservation across listing restoration.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

注册 for free to join this conversation on GitHub. Already have an account? 登录 to comment

标签

None yet

项目

None yet

Development

Successfully merging this pull request may close these issues.

2 participants