agentHost: adopt latest protocol cleanups#312076
Merged
connor4312 merged 1 commit intomainfrom Apr 23, 2026
Merged
Conversation
Contributor
Contributor
There was a problem hiding this comment.
Pull request overview
Updates VS Code’s Agent Host integration to match the latest upstream protocol cleanups (microsoft/agent-host-protocol#74), notably moving “read/archived” metadata into SessionStatus flags and renaming the client “done” action to “archived”.
Changes:
- Encode
isRead/isArchivedasSessionStatusbitmask flags; remove legacyisRead/isDonefields from protocolSessionSummary. - Rename protocol action
session/isDoneChanged→session/isArchivedChangedand update reducers/side effects/providers accordingly (with legacy fallback where needed). - Update integration tests and UI/session adapters to interpret status flags.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListController.ts | Maps new status bitmask semantics for session list UI and encodes read/archived into status. |
| src/vs/sessions/contrib/remoteAgentHost/browser/remoteAgentHostSessionsProvider.ts | Persists isArchived (and reads legacy isDone) in serialized session metadata. |
| src/vs/sessions/contrib/agentHost/browser/baseAgentHostSessionsProvider.ts | Updates adapters/actions/summary handling for archived semantics and status flags. |
| src/vs/platform/agentHost/test/node/protocol/sessionLifecycle.integrationTest.ts | Adjusts lifecycle assertions to use SessionStatus flags and new archived action. |
| src/vs/platform/agentHost/node/protocolServerHandler.ts | Emits SessionSummary.status with read/archived encoded as flags; removes legacy fields. |
| src/vs/platform/agentHost/node/agentSideEffects.ts | Persists isArchived in session DB when archived action is dispatched. |
| src/vs/platform/agentHost/node/agentService.ts | Reads/writes archived metadata (with legacy isDone fallback) and encodes flags into status. |
| src/vs/platform/agentHost/node/agentHostStateManager.ts | Stops emitting separate summary change fields for isRead/isDone (now represented in status). |
| src/vs/platform/agentHost/common/state/sessionActions.ts | Renames exported archived action types. |
| src/vs/platform/agentHost/common/state/protocol/version/registry.ts | Updates action-version registry for archived action. |
| src/vs/platform/agentHost/common/state/protocol/state.ts | Adds SessionStatus.IsRead/IsArchived flags and removes SessionSummary.isRead/isDone. |
| src/vs/platform/agentHost/common/state/protocol/reducers.ts | Preserves status flags while deriving activity state; updates reducers to toggle flags via status bitmask. |
| src/vs/platform/agentHost/common/state/protocol/actions.ts | Renames the “done” action contract to “archived” and updates payload shape. |
| src/vs/platform/agentHost/common/state/protocol/action-origin.generated.ts | Regenerates action unions/dispatchability for archived action rename. |
| src/vs/platform/agentHost/common/state/protocol/.ahp-version | Bumps synced protocol revision pointer. |
| src/vs/platform/agentHost/common/agentService.ts | Updates IAgentSessionMetadata to expose isArchived instead of isDone. |
| src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.ts | Derives isRead/isArchived from status flags when mapping listSessions results. |
Copilot's findings
- Files reviewed: 17/17 changed files
- Comments generated: 1
| } | ||
|
|
||
| /** Derives the summary status from live session work. */ | ||
| /** Bitmask covering the mutually-exclusive activity bits (bits 0–4). */ |
There was a problem hiding this comment.
The comment on STATUS_ACTIVITY_MASK says it covers “mutually-exclusive activity bits”, but SessionStatus.InputNeeded is defined as a combination of bits (InProgress | InputNeededBit). Consider rewording to clarify this mask represents the reserved activity bit range (bits 0–4) that should be replaced as a group, rather than implying each bit is mutually exclusive.
Suggested change
| /** Bitmask covering the mutually-exclusive activity bits (bits 0–4). */ | |
| /** Bitmask covering the reserved activity bit range (bits 0–4), which is replaced as a group. */ |
TylerLeonhardt
approved these changes
Apr 23, 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.
Adopts https://github.com/microsoft/agent-host-protocol/pull/74