Skip to content

sessions: discover remote nested sessions - #350377

Queued
Dmitriy Vasyura (dmitrivMS) wants to merge 3 commits into
mainfrom
agents/fix-vscode-issue-338718
Queued

Dmitriy Vasyura (dmitrivMS) wants to merge 3 commits into
mainfrom
agents/fix-vscode-issue-338718

Conversation

@dmitrivMS

@dmitrivMS Dmitriy Vasyura (dmitrivMS) commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #338718

Expose visible peer chats, including the main chat, when inspecting a remote session. The returned host-qualified links identify the exact chats for inspection or messaging. Hidden and tool-origin chats are excluded, and unavailable results do not include stale chat lists. Preserve reserved characters in session links through VS Code's URI/query parsing.

Expose visible peer chats during remote inspection and preserve opaque session link identities.

Fixes #338718

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dmitrivMS Dmitriy Vasyura (dmitrivMS) added remote Remote system operations issues agents-window agent-host Issues for the agent-host implementation (not the protocol) multi-chat-sessions Mulit-chat sessions issues labels Nov 25, 2026
Copilot AI balanced review requested due to automatic review settings November 25, 2026 13:39
@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: acde2192 Current: 7dd9144a

Changed (1)

chat/chatSubagentContent/ThinkingAcrossCompletion/Light
Before After
before after

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.

🟡 Changes recommended

Distinct advertised chat resources produce identical links, causing inspection or messaging to target the wrong conversation; preserve exact resources for ambiguous selectors and add regression coverage.

1 open issue
What changed in this PR

Adds remote peer-chat discovery to the Agents Window’s read-only session inspection tool, addressing #338718 without changing remote creation hierarchy.

Changes:

  • Returns visible chat titles and host-qualified links, excluding hidden and tool-origin chats.
  • Protects reserved characters in session-link query values.
  • Adds regression coverage for discovery, link round-trips, host scoping, and disconnect handling.
File Description
src/​vs/​sessions/​SESSIONS.md Documents peer-chat discovery during remote inspection.
src/​vs/​sessions/​contrib/​remoteSessions/​test/​browser/​remoteSessionTools.test.ts Tests reserved characters in scoped session identities.
src/​vs/​sessions/​contrib/​remoteSessions/​test/​browser/​remoteSessionInspector.test.ts Covers visibility filtering, opaque chats, host-qualified links, and stale-result prevention.
src/​vs/​sessions/​contrib/​remoteSessions/​common/​remoteSessionInspection.ts Adds optional chat summaries to inspection results.
src/​vs/​sessions/​contrib/​remoteSessions/​browser/​remoteSessionInspector.ts Builds filtered chat summaries and host-qualified links.
src/​vs/​sessions/​contrib/​remoteSessions/​browser/​getRemoteSessionTool.ts Describes discovery results and link usage to the model.
src/​vs/​platform/​agentHost/​test/​common/​openSessionLink.test.ts Tests reserved-character preservation across link formats.
src/​vs/​platform/​agentHost/​common/​openSessionLink.ts Protects query values through URI and query parsing.

Review effort: Balanced

@dmitrivMS Dmitriy Vasyura (dmitrivMS) added this to the 1.149.0 milestone Nov 25, 2026
Use the exact advertised chat resource when its short selector resolves to another catalog entry. Cover inspection through each discovered link for peers sharing a short ID.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Verify that copied remote links preserve the host, backend session, and chat when parsed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dmitrivMS
Dmitriy Vasyura (dmitrivMS) marked this pull request as ready for review November 25, 2026 14:13
@dmitrivMS
Dmitriy Vasyura (dmitrivMS) added this pull request to the merge queue Nov 25, 2026
Any commits made after this event will not be merged.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-host Issues for the agent-host implementation (not the protocol) agents-window multi-chat-sessions Mulit-chat sessions issues remote Remote system operations issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agent cannot find remote sub-sessions

4 participants