Skip to content

agent host: adopt durable error response parts - #332606

Merged
roblourens merged 3 commits into
mainfrom
roblou/agents/ahp-vscode-minimal-changes
Aug 25, 2026
Merged

agent host: adopt durable error response parts#332606
roblourens merged 3 commits into
mainfrom
roblou/agents/ahp-vscode-minimal-changes

Conversation

@roblourens

Copy link
Copy Markdown
Member

Summary

The generated protocol includes the upstream turn-resume action and reducer support, but this change intentionally adds no resume UI, command, or new user-facing behavior.

Validation

  • npm run compile
  • npm run hygiene
  • npm run typecheck-client
  • npm run transpile-client
  • 1,361 focused agent host and chat unit tests
  • staged diff review

(Written by Copilot)

Sync the generated AHP types to b4016c0e and adapt existing error producers, restored sessions, UI consumers, telemetry, and tests to the durable response-part shape. This intentionally does not expose turn resume behavior.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings August 25, 2026 20:11
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

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

TylerLeonhardt

Matched files:

  • src/vs/platform/agentHost/node/claude/claudeMapSessionEvents.ts

Remove the obsolete Turn.error expectation after adopting durable error response parts.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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

Adopts durable Agent Host error response parts across protocol state, providers, restoration, telemetry, rendering, and tests.

Changes:

  • Syncs generated protocol definitions to b4016c0e.
  • Migrates error producers and consumers to ErrorResponsePart.
  • Includes turn-resume protocol types without UI support.

Review finding: Backward compatibility for legacy error payloads is incomplete, and unsupported resume actions are not rejected.

Show a summary per file
File Description
src/vs/workbench/contrib/chat/test/browser/agentSessions/stateToProgressAdapter.test.ts Updates restored-error tests.
src/vs/workbench/contrib/chat/test/browser/agentSessions/importLocalConversationToAgentSession.test.ts Updates imported-error assertions.
src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatContribution.test.ts Normalizes legacy test errors.
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/stateToProgressAdapter.ts Reads durable turn errors.
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/importLocalConversationToAgentSession.ts Stores imported errors as parts.
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.ts Uses durable errors and narrows tool requests.
src/vs/platform/agentHost/test/node/protocol/turnExecution.integrationTest.ts Updates protocol error assertion.
src/vs/platform/agentHost/test/node/mockAgent.ts Emits durable error actions.
src/vs/platform/agentHost/test/node/mapSessionEvents.test.ts Verifies restored error parts.
src/vs/platform/agentHost/test/node/e2e/suites/multiChatSuite.ts Updates E2E error handling.
src/vs/platform/agentHost/test/node/e2e/suites/coreSuite.ts Updates typed error assertions.
src/vs/platform/agentHost/test/node/e2e/suites/copilotCoverageSuite.ts Reads durable errors.
src/vs/platform/agentHost/test/node/e2e/providers/copilotAgentHostE2E.integrationTest.ts Verifies durable restored errors.
src/vs/platform/agentHost/test/node/e2e/harness/ahpSnapshot.ts Projects durable error actions.
src/vs/platform/agentHost/test/node/e2e/harness/agentHostE2ETestHarness.ts Updates harness error reporting.
src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts Verifies emitted error parts.
src/vs/platform/agentHost/test/node/codex/codexReplayMapper.test.ts Verifies replayed durable errors.
src/vs/platform/agentHost/test/node/codex/codexMapAppServerEvents.test.ts Updates Codex action expectation.
src/vs/platform/agentHost/test/node/claudeMapSessionEvents.test.ts Reads Claude error parts.
src/vs/platform/agentHost/test/node/chatContributions.test.ts Updates contribution error actions.
src/vs/platform/agentHost/test/node/agentSideEffects.test.ts Migrates side-effect fixtures.
src/vs/platform/agentHost/test/node/agentHostTurnTelemetry.test.ts Migrates telemetry fixtures.
src/vs/platform/agentHost/test/node/agentHostStateManager.test.ts Updates reducer fixture.
src/vs/platform/agentHost/node/copilot/mapSessionEvents.ts Restores errors as response parts.
src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts Emits durable Copilot errors.
src/vs/platform/agentHost/node/codex/codexReplayMapper.ts Restores durable Codex errors.
src/vs/platform/agentHost/node/codex/codexMapAppServerEvents.ts Maps Codex failures to parts.
src/vs/platform/agentHost/node/codex/codexAgent.ts Migrates Codex error producers.
src/vs/platform/agentHost/node/claude/claudeMapSessionEvents.ts Migrates Claude error producer.
src/vs/platform/agentHost/node/chatContributions/queueDrain/queueDrainContribution.ts Migrates queue failure action.
src/vs/platform/agentHost/node/agentSideEffects.ts Consumes and emits error parts.
src/vs/platform/agentHost/common/state/sessionState.ts Adds durable-error accessor.
src/vs/platform/agentHost/common/state/protocol/version/registry.ts Registers resume action version.
src/vs/platform/agentHost/common/state/protocol/common/notifications.ts Syncs enum metadata.
src/vs/platform/agentHost/common/state/protocol/common/errors.ts Syncs protocol error contract.
src/vs/platform/agentHost/common/state/protocol/common/commands.ts Syncs command documentation.
src/vs/platform/agentHost/common/state/protocol/common/actions.ts Adds resume action type.
src/vs/platform/agentHost/common/state/protocol/channels-terminal/state.ts Syncs enum metadata.
src/vs/platform/agentHost/common/state/protocol/channels-session/state.ts Narrows tool execution state.
src/vs/platform/agentHost/common/state/protocol/channels-session/commands.ts Syncs enum metadata.
src/vs/platform/agentHost/common/state/protocol/channels-root/state.ts Syncs enum metadata.
src/vs/platform/agentHost/common/state/protocol/channels-resource-watch/state.ts Syncs enum metadata.
src/vs/platform/agentHost/common/state/protocol/channels-resource-watch/commands.ts Corrects documentation link.
src/vs/platform/agentHost/common/state/protocol/channels-chat/state.ts Defines durable error parts.
src/vs/platform/agentHost/common/state/protocol/channels-chat/reducer.ts Stores errors and supports resume.
src/vs/platform/agentHost/common/state/protocol/channels-chat/commands.ts Syncs enum metadata.
src/vs/platform/agentHost/common/state/protocol/channels-chat/actions.ts Changes error action and adds resume.
src/vs/platform/agentHost/common/state/protocol/channels-changeset/state.ts Syncs enum metadata.
src/vs/platform/agentHost/common/state/protocol/channels-changeset/commands.ts Syncs enum metadata.
src/vs/platform/agentHost/common/state/protocol/channels-automation/state.ts Syncs enum metadata.
src/vs/platform/agentHost/common/state/protocol/channels-automation-run/state.ts Syncs enum metadata.
src/vs/platform/agentHost/common/state/protocol/action-origin.generated.ts Marks resume client-dispatchable.
src/vs/platform/agentHost/common/state/protocol/.ahp-version Records synced protocol commit.

Review details

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

  • Files reviewed: 54/54 changed files
  • Comments generated: 3
  • Review effort level: Balanced

Comment thread src/vs/platform/agentHost/common/state/sessionState.ts
Normalize legacy live and restored error shapes before reduction, and reject turn resume until provider support exists. This preserves behavior with negotiated older hosts while keeping resume disabled.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@roblourens
roblourens merged commit 28c109e into main Aug 25, 2026
27 checks passed
@roblourens
roblourens deleted the roblou/agents/ahp-vscode-minimal-changes branch August 25, 2026 22:17
@vs-code-engineering vs-code-engineering Bot added this to the 1.136.0 milestone Aug 25, 2026
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.

3 participants