Repository navigation
agentHost: chats with their own harness in a session (multipleChatProviders) - #344685
Sandeep Somavarapu (sandy081) merged 100 commits into
Conversation
…ess contracts Sync AHP at 05b7553 (multipleChatProviders capability, per-chat provider, ChatConfigState.schema), add the off-by-default chat.agentHost.multipleChatProviders.enabled gate, and add provider-neutral IChat.harness, ISessionCapabilities.supportsChatHarnesses and ICreateNewChatOptions. Co-authored-by: Copilot <[email protected]>
Derive ISessionCapabilities.supportsChatHarnesses from agents that support multiple chats (not policy-disabled) only when the connection advertises multipleChatProviders, chat.agentHost.multipleChatProviders.enabled is on, and the session supports multiple chats. Map ChatSummary/SessionChatSummary.provider to IChat.harness, resolve each chat's models and config against its own agent (ChatConfigState.schema when present), send `provider` on createChat only for a different harness, keep fork/side chats on the source chat's agent, and only reuse an Untitled chat whose harness matches the requested one. Co-authored-by: Copilot <[email protected]>
Add a harness picker to the new-chat composer, shown only while the active chat is an unsent peer draft and the session advertises more than one entry in supportsChatHarnesses; choosing another harness replaces the draft with one of that harness. Chat tabs show the harness icon (and name it for screen readers) when a chat's harness differs from the main chat's, and Sessions list rows mark sessions whose chats use more than one harness. Providers present harnesses through the optional getHarnessPresentation, and the accessibility help describes the picker while the setting is enabled. Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Chats of one session can use another agent than the session when the off-by-default `multipleChatProviders.enabled` host setting is on (renamed from `chatProviders.enabled`). The host advertises `InitializeResult.multipleChatProviders` only then and from protocol 1.1.0, and rejects `CreateChatParams.provider` otherwise. - createChat resolves the chat's agent (requested, fork/side-chat source, or session) and rejects unknown agents, agents without multipleChats and fork/side-chat mismatches with InvalidParams. - The state manager records each chat's agent and publishes `provider` on ChatState, ChatSummary and SessionChatSummary when it differs; chatUpdated never carries it. - IAgentHostProviderService.getProviderForChat routes every chat-addressed operation (turns, input, steering, abort, canvases, background work, watches, release, dispose, telemetry, utility model, workspace conversion). - The agent is persisted in the chat's chats_v2 metadata and the list payload, so listing, restore and deleting an unloaded session route each chat before hydration. - Such a chat gets its own ChatConfigState.schema seeded with its agent's defaults, never takes or changes the session's config, and is validated against its own schema. - Moves keep a chat's agent; moves that would add or drop a chat's own agent, and promoting such a chat, are refused with differentProvider. Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
- Rebuild a peer chat whose reported agent changes (e.g. moved in from another session) so its harness and config schema refresh. - Re-read harness presentation as session types load, falling back to a localized generic label instead of the raw harness id. - Restore iconForAgentProvider's doc and document getHarnessPresentation. - Register the mixed-harness hover only while a row is mixed and use Codicon.agent for it. - Render the harness picker before an explicit anchor. - Gate the accessibility help sentence on a visible session offering several harnesses. - Pin main-harness reuse and reset, and composer survival on a harness switch, in tests. Co-authored-by: Copilot <[email protected]>
- Never route a chat whose own agent is unavailable to its session's agent: release, dispose and fork/side-chat resolution skip or reject it. - Write a chat's agent in the same transaction as its new chats_v2 row; subagent rows record their spawning chat's agent, and subagent restore uses it. - Route a chat to its agent already while the agent creates it, before registration. - Restore resolves an agent's chat config once per agent and folder and drops persisted keys its schema no longer has. - A fork or side chat whose source has no loaded own schema takes its agent's schema, never the session's. - Chat-scoped folder checks use the chat's agent; archive changes notify the agents of chats with their own agent. - Skip the own-schema lookup in config reads while no chat uses its own agent. Co-authored-by: Copilot <[email protected]>
Keep ChatCompositeBar's class documentation on the class by documenting the tab hover helper above it, build a tab's harness marker only for a chat on another harness than the main chat's (still reactive to presentation), and mark sessions mixing harnesses with Codicon.combine so it does not read as the generic agent icon used for unknown harnesses. Co-authored-by: Copilot <[email protected]>
Older builds re-encode the sessions_v2 payload and chats_v2 metadata through validators that strip unknown keys, so a `provider` inside them made the payload non-canonical there and was lost on their next metadata write. - Store each chat's agent in agent-host.db `metadata` under `chatAgentProvider:<chat>` (optional IAgentHostDatabase read/record/delete, forwarded by CompatibleAgentHostDatabase), written before the chat's catalog row and at spawn for a subagent of such a chat. - Remove `provider` from chats_v2 metadata, the catalog payload, its source resolver, list reader, normalization and migration: the validators are again byte-identical to release/1.143. - Listing, restore, subagent restore and deleting an unloaded session read the agents from the key; listing still reports IAgentSessionChatMetadata.provider before any chat opens. - Delete the key with the chat, on a rolled-back creation, and with its session. Co-authored-by: Copilot <[email protected]>
- Refuse a chat with its own agent on a host that can't persist its agent, instead of keeping it only in memory. - Forget the recorded agents of a deleted chat's subagents with it. - Record a spawned subagent's agent before its catalog row. - When the recorded agents can't be read, warn and skip unknown chats on restore and session deletion instead of failing or using the session's agent. - Drop a stale stacked doc comment. Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Clients offered only the compatibility baselines (1.0.0, 0.10.0, 0.9.0), so a host negotiated 1.0.0 and never advertised `multipleChatProviders`, which needs 1.1.0: the harness picker never appeared. - AgentHostProtocolClient (shared by the local, remote/tunnel, SSH, WSL and editor remote hosts) offers PROTOCOL_VERSION first while `chat.agentHost.multipleChatProviders.enabled` is on, read on every initialize; with the setting off the offer is unchanged. - The setting's description says it applies on the next connection. - Tests: the offered list per setting, the real client's initialize offer, and that offer through the server handler advertising the capability only with the setting on. Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…own agents The host decides `multipleChatProviders` from its root config at the handshake, while the client mirrors `multipleChatProviders.enabled` only after it, so a fresh host or profile needed a second reconnect before the harness picker appeared. With the setting on, once the host's root config shows the gate on after a handshake that negotiated 1.1.0 without the capability, the client re-initializes once through the fresh-initialize reconnect path. It doesn't again until the host's gate turns off, so it never loops; with the setting off nothing changes. Co-authored-by: Copilot <[email protected]>
A host decides `multipleChatProviders` at the handshake, but another window can later mirror `multipleChatProviders.enabled = false`, after which the host rejects chats with their own agent. Chat harnesses are now advertised only while the host's root config also has the gate on. Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
A peer chat answered by another agent than its session's (e.g. a Claude chat in a Copilot session) offered the session agent's models and presented itself as that agent. The Agents window chat view now binds a respondent for such a chat, derived from its harness presentation (with the generic fallback until known) and the session type its models are published under. ChatWidget applies it to the input placeholder and the response identity, and the input part selects models only from that session type's pool, offering nothing while it is empty. Requests still route by the chat's resource. Chats on the session's harness, and sessions with the gate off, are unchanged. Co-authored-by: Copilot <[email protected]>
- Clear a placeholder this widget set when no respondent, locked agent or view-model placeholder applies, and drop a respondent (and its model pool override) for another chat on setModel. - Bind the respondent ahead of the model, scoped to the incoming chat, so a chat answered by another agent never validates against its session's models; the input part only revalidates when the bound chat is affected. - Always present a chat on another harness, re-deriving its model pool as the provider's models or session types change; while the pool is not resolved apart from the session's, nothing is selectable. - Name that harness in the response aria label. - Pin that agent-host session types require custom models, which keeps their pools empty instead of falling back while models load. Co-authored-by: Copilot <[email protected]>
Dropping or replacing the bound chat's respondent while switching chats revalidated it against its session's pool, which could sync another harness's model into it. The input part now revalidates only for the chat bound to the view and only when asked; respondents set ahead for an incoming chat, dropped on setModel, or cleared by an unbind never revalidate. Unbinding clears the respondent, a "none" declared for another chat leaves the bound chat's alone, and the renderer's response identity is only updated when it changes. Co-authored-by: Copilot <[email protected]>
Replace the bespoke ChatHarnessPicker with SessionTypePicker in a new peer-chat mode: it offers the session types of the active session's supportsChatHarnesses (via the provider's getHarnessSessionType), shows the unsent peer chat's harness, never persists a pick, and hands it to the composer, which swaps the draft for one of that harness and deletes the replaced draft. Availability, initialization on selection, grouping, keyboard, accessibility and telemetry (with its own source) now come from the shared picker; the new-session view is unchanged. Co-authored-by: Copilot <[email protected]>
The Sessions list hover of a peer chat on another harness than its session's showed the session's harness (e.g. "Copilot" for a Claude chat). A chat hover now takes its provider label from the chat's harness presentation, with the generic fallback while unknown, and the chat row's aria label names that harness. Main and same-harness chats are unchanged. Co-authored-by: Copilot <[email protected]>
Name the peer-chat mode of the session-type picker "Harness for New Chat" (trigger, popup and mobile sheet) and in the accessibility help, ignore a harness pick while a switch is pending and only replace the draft while the user is still in that session's composer, keep the composer helpers above the widget's documentation, and document the resolve-before-read ordering of the peer-chat harnesses and that getHarnessSessionType is not reactive. Co-authored-by: Copilot <[email protected]>
Render the peer-chat session-type picker in the new-session view's header row above the input (the quick-chat header host and the pill slot classes) instead of the session controls below it. The row is shown only while the picker is (an unsent peer draft with at least two harnesses), so it leaves no gap; labels and behavior are unchanged. Co-authored-by: Copilot <[email protected]>
… chat Nest the new chat's harness pill in a session-options group as the new-session view does, so its label spacing (and width) match, and space the header row from the content below with the new-session picker row's spacing token. The picker shows a picked harness before its chat is open, so a send made meanwhile reached the draft being replaced, which was then deleted: the typed text was consumed and no turn ran. A send now waits for the in-flight harness switch and goes to the picked harness's chat. Co-authored-by: Copilot <[email protected]>
# Conflicts: # src/vs/platform/agentHost/common/agentHostStarter.config.contribution.ts # src/vs/sessions/contrib/providers/agentHost/browser/baseAgentHostSessionsProvider.ts # src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsProvider.ts # src/vs/sessions/services/sessions/common/sessionsManagement.ts
…stead of subscribing every catalog chat; retry a subscribe lost to a reconnect Co-authored-by: Copilot <[email protected]>
…ion was released Co-authored-by: Copilot <[email protected]>
…n was released Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…ort-implementation
Forking a restored, not yet loaded chat of another session looked its agent
up under the new chat's session, found none and refused ("The agent of chat
… is unavailable"). The source's agent is now resolved through the state
manager's owner and recorded agent: a fork keeps an own-agent source's
agent, and with chats with their own agents on, its source's session's.
With them off, only a source that already uses its own agent imposes it;
other forks use their new session's agent, as before.
Co-authored-by: Copilot <[email protected]>
…' into sandy081/agents/multiple-chat-harness-support
…ple-chat-harness-support # Conflicts: # src/vs/sessions/contrib/sessions/test/browser/sessionsList.test.ts
The fork test now also forks a restored chat of a 'second' session (on its session's agent) into a copilot session: 'second' with chats with their own agents on, 'copilot' with them off. Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
Configuration inheritance changes even when the feature is disabled, while a workspace-resolution race can bypass the selected worktree and query-only chat addressing can restore models under the wrong provider.
3 open issues
What changed in this PR
Adds experimental support for chats backed by different agents within one Agents-window session, spanning Agent Host routing, persistence, protocol support, and chat presentation.
Changes:
- Introduces per-chat provider identity, independent configuration, and cross-agent move support.
- Makes model selection and harness presentation chat-aware, including accessibility labels.
- Tightens subscription cleanup and adds regression tests and replay captures.
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/test/browser/widget/input/chatInputPart.test.ts | Updated as part of this pull request. |
| src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostSandboxNotification.test.ts | Updated as part of this pull request. |
| src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostGenericConfigChips.test.ts | Updated as part of this pull request. |
| src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatInputPicker.test.ts | Updated as part of this pull request. |
| src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatContribution.test.ts | Updated as part of this pull request. |
| src/vs/workbench/contrib/chat/test/browser/agentHost/agentHostResponseFileChanges.test.ts | Updated as part of this pull request. |
| src/vs/workbench/contrib/chat/test/browser/accessibility/chatAccessibilityProvider.test.ts | Updated as part of this pull request. |
| src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts | Updated as part of this pull request. |
| src/vs/workbench/contrib/chat/browser/widget/chatListWidget.ts | Updated as part of this pull request. |
| src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.ts | Updated as part of this pull request. |
| src/vs/workbench/contrib/chat/browser/chat.ts | Updated as part of this pull request. |
| src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.ts | Updated as part of this pull request. |
| src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSandboxNotification.ts | Updated as part of this pull request. |
| src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostResponseFileChanges.ts | Updated as part of this pull request. |
| src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatInputPicker.ts | Updated as part of this pull request. |
| src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.ts | Updated as part of this pull request. |
| src/vs/sessions/test/browser/chatGroupsView.test.ts | Updated as part of this pull request. |
| src/vs/sessions/test/browser/chatCompositeBar.test.ts | Updated as part of this pull request. |
| src/vs/sessions/SESSIONS.md | Updated as part of this pull request. |
| src/vs/sessions/services/sessions/test/common/session.test.ts | Updated as part of this pull request. |
| src/vs/sessions/services/sessions/test/browser/sessionsManagementService.test.ts | Updated as part of this pull request. |
| src/vs/sessions/services/sessions/common/sessionsProvider.ts | Updated as part of this pull request. |
| src/vs/sessions/services/sessions/common/sessionsManagement.ts | Updated as part of this pull request. |
| src/vs/sessions/services/sessions/common/session.ts | Updated as part of this pull request. |
| src/vs/sessions/services/sessions/browser/sessionsManagementService.ts | Updated as part of this pull request. |
| src/vs/sessions/contrib/sessions/test/browser/sessionsListChatMoveDnd.test.ts | Updated as part of this pull request. |
| src/vs/sessions/contrib/sessions/browser/sessionsActions.ts | Updated as part of this pull request. |
| src/vs/sessions/contrib/sessions/browser/sessionHoverContent.ts | Updated as part of this pull request. |
| src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHostSessionsProvider.ts | Updated as part of this pull request. |
| src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsProvider.ts | Updated as part of this pull request. |
| src/vs/sessions/contrib/providers/agentHost/test/browser/agentHostChatMoveErrors.test.ts | Updated as part of this pull request. |
| src/vs/sessions/contrib/providers/agentHost/browser/agentHostChatMoveErrors.ts | Updated as part of this pull request. |
| src/vs/sessions/contrib/chat/test/browser/nestedChatComposer.test.ts | Updated as part of this pull request. |
| src/vs/sessions/contrib/chat/browser/sessionsChatAccessibilityHelp.ts | Updated as part of this pull request. |
| src/vs/sessions/contrib/chat/browser/sessionModelSelection.ts | Updated as part of this pull request. |
| src/vs/sessions/contrib/chat/browser/nestedChatWorkspacePicker.ts | Updated as part of this pull request. |
| src/vs/sessions/contrib/chat/browser/mobile/mobileSessionTypePicker.ts | Updated as part of this pull request. |
| src/vs/sessions/contrib/chat/browser/chatView.ts | Updated as part of this pull request. |
| src/vs/sessions/browser/parts/chatCompositeBar.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/test/node/testAgentHostProviderService.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/test/node/shared/editArcReporter.test.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/test/node/sessionSandbox.test.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/test/node/sessionPermissions.test.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/test/node/nodeAgentHostStarter.test.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/test/node/e2e/suites/agentHostE2ESuites.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/test/node/e2e/KNOWN_ISSUES.md | Updated as part of this pull request. |
| src/vs/platform/agentHost/test/node/e2e/captures/claude-chats-of-one-session-run-turns-in-their-own-agent.yaml | Updated as part of this pull request. |
| src/vs/platform/agentHost/test/node/e2e/captures/claude-chats-keep-their-own-agent-across-a-host-restart.yaml | Updated as part of this pull request. |
| src/vs/platform/agentHost/test/node/e2e/captures/claude-a-fork-stays-on-its-source-chat-s-agent-and-rejects-another-provider.yaml | Updated as part of this pull request. |
| src/vs/platform/agentHost/test/node/copilotShellTools.test.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/test/node/agentSideEffects.test.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/test/node/agentMergeController.test.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/test/node/agentHostUtilityModelService.test.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/test/node/agentHostStateManager.test.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/test/node/agentHostSessionOpenTelemetry.test.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/test/node/agentHostPullRequestOperationHandler.test.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/test/node/agentHostChangesetService.test.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/test/node/agentHostChangesetOperationService.test.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/test/node/agentConfigurationService.test.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/test/common/sessionConfigProperties.test.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/test/common/agentSubscription.test.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/test/common/agentHostProtocolCompatibility.test.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/node/shared/sessionMoveTools.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/node/protocolServerHandler.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/node/nodeAgentHostStarter.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/node/compatibleAgentHostDatabase.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/node/chatContributions/sessionWorkspaceConversion/sessionWorkspaceConversionService.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/node/chatContributions/sessionInputNeeded/sessionInputNeededContribution.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/node/chatContributions/queueDrain/queueDrainContribution.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/node/chatContributions/chatConfig/chatConfigContribution.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/node/agentServiceFoundation.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/node/agentServiceComposition.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/node/agentHostUtilityModelService.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/node/agentHostTurnTelemetryContext.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/node/agentHostTurnStarter.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/node/agentHostSessionOpenTelemetry.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/node/agentHostProviderService.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/node/agentHostMain.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/node/agentHostDatabase.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/node/agentHostChatInputService.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/node/agentHostChangesetService.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/electron-main/electronAgentHostStarter.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/common/state/sessionState.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/common/state/protocol/version/registry.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/common/state/protocol/common/commands.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/common/state/protocol/common/actions.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/common/state/protocol/channels-session/state.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/common/state/protocol/channels-session/reducer.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/common/state/protocol/channels-session/actions.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/common/state/protocol/channels-chat/state.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/common/state/protocol/channels-chat/reducer.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/common/state/protocol/channels-chat/commands.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/common/state/protocol/channels-chat/actions.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/common/state/protocol/action-origin.generated.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/common/state/protocol/.ahp-version | Updated as part of this pull request. |
| src/vs/platform/agentHost/common/state/agentSubscription.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/common/sessionConfigProperties.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/common/agentService.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/common/agentHostStarter.config.contribution.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/common/agentHostProtocolCompatibility.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/common/agentHostChatProviders.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/common/agentHostChatMove.ts | Updated as part of this pull request. |
| src/vs/platform/agentHost/common/agent.ts | Updated as part of this pull request. |
Review effort: Balanced
…' into sandy081/agents/multiple-chat-harness-support
|
Base:
|
|
Live validation update. The final build validated is Live run 2 (the pending rows): all PASS
Live run 3 (final smoke on
NOT RUN (mock limits; needs real providers):
Follow-ups (not in this PR)
|
…dy081/agents/multi-agent-chat-support-implementation
…ple-chat-harness-support # Conflicts: # src/vs/sessions/contrib/providers/agentHost/browser/baseAgentHostSessionsProvider.ts
…ents Addresses review thread 4397526053 on #344685: the complete-values model (a chat's values are its complete config, completed from its session, the default chat following session writes) changed per-chat config inheritance even with chat.agentHost.multipleChatProviders.enabled off. It now applies only while the host's multipleChatProviders.enabled is on. With it off, a chat's values are an overlay on its session's, as on main: getEffectiveChatConfig applies them over the session's (applyChatConfigLayers), the host completes, mirrors, clears and rewrites no chat values, and restored rows stay overlays. Clients read the same way (hostPublishesCompleteChatConfig from the host's root config), and route main-chat writes to the default chat as before. Turning the setting on completes loaded chats; turning it off reads complete values as overlays again and the default chat publishes only its own values. Main's per-chat config tests are restored unchanged; the complete-values tests run with the setting on. Co-authored-by: Copilot <[email protected]>
…refresh before send, resolve a query-addressed chat's model vendor - e2e: expect the host's current unknown-agent refusal and a different-agent chat's own config schema (AHP #534) - chatModelConfigurationStore test and agentHostModePicker fixture: provide the members the client now reads - nestedChatWorkspacePicker: resolveWorkspace awaits a refresh's folder re-read so a kept worktree choice is sent - agentHostSessionHandler: resolve a chat addressed only by its subagent query to its catalog entry for its model vendor Co-authored-by: Copilot <[email protected]>
…' into sandy081/agents/multiple-chat-harness-support # Conflicts: # src/vs/sessions/contrib/providers/agentHost/browser/baseAgentHostSessionsProvider.ts
…the chat-providers key; test the default chat's flip-off republish; note copied peer values - hostPublishesCompleteChatConfig requires the root schema to declare multipleChatProviders.enabled, as an older host keeps the value a client mirrors to it (D1) - test: turning the setting off republishes only the default chat's own values, without a write or chat config change, and it follows its session again (L-a) - AGENTS.md: a peer completed while the setting was on keeps its copied values when it is turned off (L-b) Co-authored-by: Copilot <[email protected]>
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Ladislau Szomoru (@lszomoru)Matched files:
|


Summary
Lets one Agents-window session hold chats on different harnesses (agents), for example a Claude chat in a Copilot session.
The feature is behind
chat.agentHost.multipleChatProviders.enabled(APPLICATION scope, off by default). With the setting off, behaviour, protocol offers and tool descriptions are identical tomain.It builds on AHP microsoft/agent-host-protocol#534 (merged; synced at
5872a476).What's included
agent-host.dbmetadata (chatAgentProvider:<chat>). Downgrade-safe.chatMutablevalues. A chat on another agent has its own schema. The main chat follows the session pickers.chat.agentHost.moveChats.enabled.chat/moved.create_sessionharnessfor agent-to-agent work.Validation
Final head
747060d951cThe final head is latest
main(883544e3cad) + host option A (be0fadd2ff5: per-chat config stays an overlay while the setting is off) + D1 (complete chat config is read only from a host that declares the setting).00ad7a5d728→747060d951c: SHIP. All three Copilot review threads are resolved.ChatModelConfigurationStore,agentHostModePickerfixtures);npm run typecheck-clientis clean, andnpm run eslintis clean on the changed files.00ad7a5d728(afternpm run transpile-client):./scripts/test.sh --reporter dot --runGlob "vs/platform/agentHost/test/common/**/*.test.js": 1631 passing./scripts/test.sh --reporter dot --runGlob "vs/platform/agentHost/test/browser/**/*.test.js": 167 passing./scripts/test.sh --reporter dot --runGlob "vs/platform/agentHost/test/electron-browser/**/*.test.js": 587 passing./scripts/test.sh --reporter dot --runGlob "vs/sessions/**/*.test.js": 9020 passing, 25 pending./scripts/test.sh --reporter dot --runGlob "vs/workbench/contrib/chat/test/browser/agentSessions/**/*.test.js": 3129 passing./scripts/test.sh --reporter dot --runGlob "vs/workbench/contrib/chat/test/browser/agentHost/**/*.test.js": 252 passing./scripts/test.sh --reporter dot --runGlob "vs/workbench/contrib/chat/test/browser/widget/**/*.test.js": 3709 passing, 1 failing. The failure isChatListWidget› "clips MCP app overlays…", a new upstream test (mcp: expose app tools to agent host sessions #344747) that fails only under full-suite load and passes alone (124 passing).npm run test-node -- --reporter dot(all node unit tests): 30082 passing, 240 pending, 0 failing.component-explorer render --fixture-id-regex 'agentHostModePicker/.*/Light$'): 28 rendered, 0 errors.eae45cd9645):./scripts/test-integration.sh --runconformance + Claude + Copilot + Codex): 952 passing, 113 pending, 0 failing.vs/sessions: 8784 passingChatListWidgetload flake)747060d951c(D1):npm run test-node -- --run agentConfigurationService.test.ts --run agentServiceChatProviders.test.ts: 79 passingagentHost: 252 passingagentSessions: 3130 passing00ad7a5d728):Earlier rounds
557ea425bc6. All findings are resolved: H1, M1–M4, L1–L5, N1, P1, R1, S1.5893cd55828with two windows on different workspaces, gate off and on.resolveSessionConfig.typecheck-clientclean; eslint clean on all 110 changed TS files;valid-layers-checkpasses; no cyclic dependencies.main: new baseea8056df9f0, merged inf36b6e2653d, plus the host's test-onlyde7d2529153in86cf91d96f8. No dependency,.nvmrcor AHP protocol changes upstream.npm run typecheck-clientclean;npm run eslinton all 113 changed TS files clean;npm run valid-layers-checkpasses;npm run check-cyclic-dependenciesreports no cycles in 10903 files.npm run transpile-client, atf36b6e2653d):./scripts/test.sh --reporter dot --runGlob "vs/platform/agentHost/test/common/**/*.test.js": 1623 passing./scripts/test.sh --reporter dot --runGlob "vs/platform/agentHost/test/browser/**/*.test.js": 167 passing./scripts/test.sh --reporter dot --runGlob "vs/platform/agentHost/test/electron-browser/**/*.test.js": 580 passing./scripts/test.sh --reporter dot --runGlob "vs/sessions/**/*.test.js": 8987 passing, 25 pending./scripts/test.sh --reporter dot --runGlob "vs/workbench/contrib/chat/test/browser/agentHost/**/*.test.js": 252 passing./scripts/test.sh --reporter dot --runGlob "vs/workbench/contrib/chat/test/browser/agentSessions/**/*.test.js": 3086 passing./scripts/test.sh --reporter dot --runthe chatWidget, chatInputPart and chatAccessibilityProvider tests: 194 passing, 4 pendingnpm run test-node -- --reporter dot(all node unit tests, rerun at86cf91d96f8): 29940 passing, 240 pending, 0 failingNeeds real providers (please try)
Known follow-ups / not in this PR
argv.jsonnote is pre-existing.