agentHost: adopt eager activeClient announcement#311129
Merged
connor4312 merged 5 commits intomainfrom Apr 20, 2026
Merged
Conversation
Contributor
Contributor
There was a problem hiding this comment.
Pull request overview
Adopts an “eager” active-client claim by threading activeClient through createSession, so the server can publish the active client state atomically with session creation (instead of a follow-up session/activeClientChanged dispatch from the client).
Changes:
- Pass
activeClient(clientId, tools, customizations) increateSessioncalls from the chat session handler. - Update the protocol server to dispatch
SessionActiveClientChangedimmediately after session creation whenactiveClientis provided. - Adjust/add tests to validate the new eager-claim behavior across workbench and agent host layers.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.ts | Builds activeClient and includes it in createSession; removes immediate post-create dispatch. |
| src/vs/platform/agentHost/node/protocolServerHandler.ts | Accepts activeClient on createSession and emits SessionActiveClientChanged after creation. |
| src/vs/platform/agentHost/node/copilot/copilotAgent.ts | Seeds active-client tools/customizations during session creation based on activeClient. |
| src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.ts | Forwards activeClient through the remote protocol client createSession call. |
| src/vs/platform/agentHost/common/state/protocol/commands.ts | Protocol surface update: ICreateSessionParams now supports activeClient. |
| src/vs/platform/agentHost/common/state/protocol/.ahp-version | Bumps synced agent-host-protocol version. |
| src/vs/platform/agentHost/common/agentService.ts | Exposes activeClient in IAgentCreateSessionConfig. |
| src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatContribution.test.ts | Updates expectations to assert activeClient is carried via createSession instead of separate dispatch. |
| src/vs/platform/agentHost/test/node/protocolServerHandler.test.ts | Adds tests for createSession eager active-client claim behavior and mismatch rejection. |
| src/vs/platform/agentHost/test/node/copilotAgent.test.ts | Adds tests ensuring eager seeding triggers customization sync and tools seeding. |
Copilot's findings
- Files reviewed: 10/10 changed files
- Comments generated: 4
lszomoru
previously approved these changes
Apr 18, 2026
roblourens
previously approved these changes
Apr 18, 2026
roblourens
previously approved these changes
Apr 19, 2026
ulugbekna
approved these changes
Apr 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.