Skip to content

agentHost: configure external session discovery - #330541

Open
Benjamin Christopher Simmonds (benibenj) wants to merge 2 commits into
mainfrom
agents/configurable-external-session-discovery
Open

agentHost: configure external session discovery#330541
Benjamin Christopher Simmonds (benibenj) wants to merge 2 commits into
mainfrom
agents/configurable-external-session-discovery

Conversation

@benibenj

@benibenj Benjamin Christopher Simmonds (benibenj) commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add chat.agentSessions.showExternal with none, all, last 24 hours, and last 7 days modes
  • classify external sessions centrally in the Agent Host session registry and expose the classification through typed session metadata
  • reconcile connected clients immediately while retaining live sessions, preserving legacy Copilot adoption, and forcing unused external sessions read
  • keep notification baselines independent from list requests and reconcile automatically at time-window expiry
  • preserve external ownership in restored live session metadata

Validation

  • npm run compile
  • npm run compile-client
  • targeted ESLint for all changed files
  • scripts\test.bat --run src\vs\platform\agentHost\test\node\agentSessionRegistry.test.ts --run src\vs\platform\agentHost\test\node\agentService.test.ts (274 passing)

Reviewer notes

The unreleased version-1 agent-host.db schema now includes is_external; existing development databases must be recreated. No migration is included by design.

Full npm run hygiene is blocked on Windows by an unrelated path-resolution error that resolves remote\package.json as C:\C:\....

Copilot AI commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

One or more custom setup steps configured for this repository failed during this Copilot code review run:

Download Electron and Playwright

Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review.

Note

You can configure setup steps for Copilot code review separately from Copilot cloud agent with a copilot-code-review.yml file. Read the docs for details.

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.

Pull request overview

Adds configurable discovery and visibility of external Agent Host sessions.

Changes:

  • Adds external-session visibility modes and metadata classification.
  • Persists session ownership and reconciles connected clients.
  • Updates registry and service tests for external metadata.
Show a summary per file
File Description
constants.ts Adds the workbench setting key.
chat.shared.contribution.ts Registers visibility mode settings.
agentSessionRegistry.test.ts Tests ownership transitions.
agentService.test.ts Updates expected external metadata.
agentSessionRegistry.ts Exposes persisted ownership.
agentService.ts Filters and reconciles external sessions.
agentHostStateManager.ts Supports retracting surfaced sessions.
agentHostDatabase.ts Persists external classification.
sessionState.ts Adds typed external metadata helpers.
agentHostSchema.ts Defines Agent Host visibility configuration.

Review details

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

  • Files reviewed: 10/10 changed files
  • Comments generated: 4
  • Review effort level: Balanced

Comment thread src/vs/platform/agentHost/node/agentService.ts Outdated
Comment thread src/vs/platform/agentHost/node/agentService.ts
Comment thread src/vs/platform/agentHost/node/agentService.ts Outdated
Comment thread src/vs/platform/agentHost/node/agentService.ts
Add a user-controlled external session window, central catalog ownership tracking, and immediate client reconciliation while preserving live and legacy-adoptable sessions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep broadcast state independent from list requests, expire time-window sessions automatically, preserve registry ownership during restore, and cover the discovery lifecycle.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants