Skip to content

[cherry-pick] agentHost: Refine workspace transition boundaries - #334947

Merged
Sandeep Somavarapu (sandy081) merged 1 commit into
release/1.137from
cherry-pick/334919
Sep 7, 2026
Merged

[cherry-pick] agentHost: Refine workspace transition boundaries#334947
Sandeep Somavarapu (sandy081) merged 1 commit into
release/1.137from
cherry-pick/334919

Conversation

@vs-code-engineering

Copy link
Copy Markdown
Contributor

Cherry-pick of #334919 from main.

Summary

  • omit the workspace transition boundary and marker when a workspace-less session converts during its first turn
  • preserve durable transition boundaries for conversions after prior completed turns and keep failure notifications visible
  • preload persisted workspace transitions from the existing restore database while provider history loads
  • pass storage-specific transition data into hydration so peer and subagent chats avoid redundant database probes

Validation

  • npm run transpile-client
  • npm run typecheck-client
  • targeted ESLint for all six changed files
  • ./scripts/test.sh --run src/vs/platform/agentHost/test/node/sessionWorkspaceConversion.test.ts (26 passing)
  • ./scripts/test.sh --run src/vs/platform/agentHost/test/node/agentService.test.ts --grep "loads workspace transitions alongside provider history" (1 passing)
  • git diff --check origin/main...HEAD

Copilot AI balanced review requested due to automatic review settings September 7, 2026 16:17
@vs-code-engineering vs-code-engineering Bot added the cherry-pick-artifact Auto-generated cherry-pick PR label Sep 7, 2026

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.

🟡 Changes recommended

The critical first-turn continuation persistence issue must be resolved before approval.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Refines workspace conversion boundaries and restores persisted transitions during chat hydration.

Changes:

  • Suppresses first-turn transition separators.
  • Preloads transitions alongside provider history.
  • Passes storage-specific transitions into hydration.
File summaries
File Description
src/vs/platform/agentHost/test/node/sessionWorkspaceConversion.test.ts Updates conversion and hydration tests.
src/vs/platform/agentHost/test/node/agentService.test.ts Tests concurrent and peer-chat restoration.
src/vs/platform/agentHost/node/chatContributions/sessionWorkspaceConversion/sessionWorkspaceConversionService.ts Controls transition persistence and visibility. Critical: first-turn conversions lack a durable continuation marker, exposing host-authored requests after restart.
src/vs/platform/agentHost/node/chatContributions/sessionWorkspaceConversion/sessionWorkspaceConversionContribution.ts Hydrates preloaded transitions.
src/vs/platform/agentHost/node/agentService.ts Loads transitions alongside provider history.
src/vs/platform/agentHost/common/agentHostChatContributionsService.ts Adds transitions to the hydration context.
Review details
  • Files reviewed: 6/6 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

: undefined;
let persistenceError: unknown;
const persistTransition = this._stateManager.getActiveTurnId(chat.toString()) === continuation.turnId;
const persistTransition = !!transition && this._stateManager.getActiveTurnId(chat.toString()) === continuation.turnId;
@sandy081
Sandeep Somavarapu (sandy081) merged commit 7ca4606 into release/1.137 Sep 7, 2026
31 checks passed
@sandy081
Sandeep Somavarapu (sandy081) deleted the cherry-pick/334919 branch September 7, 2026 19:14
@vs-code-engineering vs-code-engineering Bot added this to the 1.137.0 milestone Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick-artifact Auto-generated cherry-pick PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants