Skip to content

agentHost: discover provider-native chats - #330665

Merged
Sandeep Somavarapu (sandy081) merged 8 commits into
mainfrom
agents/external-provider-chat-discovery-continue
Aug 13, 2026
Merged

agentHost: discover provider-native chats#330665
Sandeep Somavarapu (sandy081) merged 8 commits into
mainfrom
agents/external-provider-chat-discovery-continue

Conversation

@sandy081

Copy link
Copy Markdown
Member

Summary

  • discover provider-native top-level Claude, Copilot, and Codex chats and register them as normal Agent Host sessions
  • persist durable external/internal provenance, migrate legacy registry rows, and preserve deletion tombstones without pruning missing provider entries
  • propagate discovered session metadata through Agent Host and the Sessions adapter while preserving provider-specific restoration behavior
  • add bounded discovery/readiness handling and regression coverage across providers, protocol transport, registry migration, and session restoration

Validation

  • npm run compile
  • npm run typecheck-client
  • npm run hygiene
  • focused Agent Host migration, discovery, restore, protocol, and provider tests

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings August 13, 2026 15:40
@sandy081 Sandeep Somavarapu (sandy081) added this to the 1.134.0 milestone Aug 13, 2026
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

Tyler James Leonhardt (@TylerLeonhardt)

Matched files:

  • src/vs/platform/agentHost/node/claude/claudeAgent.ts
  • src/vs/platform/agentHost/node/claude/claudeAgentSdkService.ts
  • src/vs/platform/agentHost/node/claude/claudeSessionMetadataStore.ts

…der-chat-discovery-continue

# Conflicts:
#	src/vs/platform/agentHost/node/claude/claudeAgent.ts
#	src/vs/platform/agentHost/node/codex/codexAgent.ts
#	src/vs/platform/agentHost/node/copilot/copilotAgent.ts
#	src/vs/platform/agentHost/test/node/agentService.test.ts
#	src/vs/platform/agentHost/test/node/claudeAgent.test.ts
#	src/vs/platform/agentHost/test/node/codex/codexCreateChat.test.ts
#	src/vs/platform/agentHost/test/node/copilotAgent.test.ts
@sandy081

Copy link
Copy Markdown
Member Author

This PR brings back showing external sessions from other apps (from claude code, codex, extension host) into agent host. Please check if there are no regressions caused.

cc Tyler James Leonhardt (@TylerLeonhardt) Giuseppe Cianci (@Giuspepe) Vritant Bhardwaj (@vritant24)

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 provider-native chat discovery to Agent Host, with durable provenance, migration support, restoration, and Sessions transport.

Changes:

  • Adds provider-driven discovery for Claude, Copilot, and Codex chats.
  • Persists and transports external/internal session provenance.
  • Expands migration, restoration, concurrency, and protocol tests.
Show a summary per file
File Description
src/vs/sessions/contrib/providers/agentHost/browser/baseAgentHostSessionsProvider.ts Persists external provenance in the Sessions cache.
src/vs/platform/agentHost/test/node/protocolServerHandler.test.ts Tests provenance transport.
src/vs/platform/agentHost/test/node/mockAgent.ts Adds discovery support to test agents.
src/vs/platform/agentHost/test/node/copilotAgent.test.ts Covers Copilot migration and restoration.
src/vs/platform/agentHost/test/node/codex/codexSessionMetadataStore.test.ts Tests known-session detection.
src/vs/platform/agentHost/test/node/codex/codexPrewarmEviction.test.ts Updates Codex discovery fixtures.
src/vs/platform/agentHost/test/node/codex/codexCreateChat.test.ts Tests invalid materialization data.
src/vs/platform/agentHost/test/node/codex/codexAgent.test.ts Tests Codex discovery and migration.
src/vs/platform/agentHost/test/node/claudeSessionMetadataStore.test.ts Tests Claude known-session detection.
src/vs/platform/agentHost/test/node/claudeAgent.test.ts Tests Claude discovery and restoration.
src/vs/platform/agentHost/test/node/agentSideEffects.test.ts Uses orchestrated session creation.
src/vs/platform/agentHost/test/node/agentSessionRegistry.test.ts Tests provenance and tombstone behavior.
src/vs/platform/agentHost/test/electron-browser/remoteAgentHostProtocolClient.test.ts Tests remote provenance transport.
src/vs/platform/agentHost/node/protocolServerHandler.ts Documents transported provenance metadata.
src/vs/platform/agentHost/node/copilot/copilotAgent.ts Adds Copilot discovery and backing recovery.
src/vs/platform/agentHost/node/codex/codexSessionMetadataStore.ts Detects known Codex sessions.
src/vs/platform/agentHost/node/codex/codexAgent.ts Adds Codex discovery and restoration.
src/vs/platform/agentHost/node/claude/claudeSessionMetadataStore.ts Detects known Claude sessions.
src/vs/platform/agentHost/node/claude/claudeAgentSdkService.ts Supports discovery-time SDK availability.
src/vs/platform/agentHost/node/claude/claudeAgent.ts Adds Claude discovery and restoration.
src/vs/platform/agentHost/node/agentSessionRegistry.ts Adds source-aware durable provenance.
src/vs/platform/agentHost/node/agentService.ts Orchestrates discovery, migration, and restore.
src/vs/platform/agentHost/node/agentHostDatabase.ts Migrates and persists provenance fields.
src/vs/platform/agentHost/common/state/sessionState.ts Defines external provenance metadata helpers.
src/vs/platform/agentHost/common/agent.ts Defines the provider discovery contract.
src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.ts Preserves provenance from remote listings.
src/vs/platform/agentHost/AGENTS.md Documents the discovery architecture.

Review details

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

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

Comment thread src/vs/platform/agentHost/node/claude/claudeAgent.ts
Comment thread src/vs/platform/agentHost/node/codex/codexAgent.ts
Comment thread src/vs/platform/agentHost/node/agentService.ts
Comment thread src/vs/platform/agentHost/node/copilot/copilotAgent.ts Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
roblourens
roblourens previously approved these changes Aug 13, 2026
…der-chat-discovery-continue

# Conflicts:
#	src/vs/platform/agentHost/common/agent.ts
#	src/vs/platform/agentHost/node/agentService.ts
#	src/vs/platform/agentHost/node/codex/codexAgent.ts
#	src/vs/platform/agentHost/test/node/agentService.test.ts
roblourens
roblourens previously approved these changes Aug 13, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sandy081
Sandeep Somavarapu (sandy081) merged commit 5f169d0 into main Aug 13, 2026
27 checks passed
@sandy081
Sandeep Somavarapu (sandy081) deleted the agents/external-provider-chat-discovery-continue branch August 13, 2026 19:00
Comment thread src/vs/platform/agentHost/node/copilot/copilotAgent.ts
Comment thread src/vs/platform/agentHost/node/agentService.ts
Comment thread src/vs/platform/agentHost/node/claude/claudeAgent.ts
Comment thread src/vs/platform/agentHost/node/agentService.ts
Comment thread src/vs/platform/agentHost/node/agentService.ts
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.

7 participants