Skip to content

agentHost: Refine workspace transition boundaries - #334919

Merged
Sandeep Somavarapu (sandy081) merged 3 commits into
mainfrom
sandy081/agents/hide-initial-workspace-transition
Sep 7, 2026
Merged

Sandeep Somavarapu (sandy081) merged 3 commits into
mainfrom
sandy081/agents/hide-initial-workspace-transition

Conversation

@sandy081

Copy link
Copy Markdown
Member

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

Skip recording and publishing the workspace transition when conversion is requested during the first turn. Preserve durable boundaries for later turns and failure notifications for unsuccessful conversions.

Co-authored-by: Copilot <[email protected]>
Reuse the session restore database reference to load transition metadata in parallel with provider history. Pass the storage-specific map into hydration so peer and subagent chats do not repeat empty transition probes.

Co-authored-by: Copilot <[email protected]>
Copilot AI balanced review requested due to automatic review settings September 7, 2026 13:52

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.

Copilot review overview

🟡 Changes recommended

Storage-specific transitions must be loaded and passed for peer and subagent restore paths, with AgentService coverage.

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

Review tier: Balanced
Findings: 1 High severity

New issues introduced by this change (1)
Severity Finding
High severity src/​vs/​platform/​agentHost/​node/​agentService.ts — workspaceTransitions is now the only way this hydration stage can restore boundaries, but only…
What changed in this PR

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

Changes:

  • Suppresses successful first-turn transition markers while preserving failures and later boundaries.
  • Preloads transition data alongside provider history.
  • Updates conversion and restoration tests.
  • Critical (2 votes): Peer and subagent restore paths do not pass storage-specific transitions, silently losing persisted boundaries.
File Description
src/​vs/​platform/​agentHost/​test/​node/​sessionWorkspaceConversion.test.ts Updates conversion and hydration coverage.
src/​vs/​platform/​agentHost/​test/​node/​agentService.test.ts Tests concurrent transition loading, but not the affected restore paths.
src/​vs/​platform/​agentHost/​node/​chatContributions/​sessionWorkspaceConversion/​sessionWorkspaceConversionService.ts Controls transition visibility and persistence.
src/​vs/​platform/​agentHost/​node/​chatContributions/​sessionWorkspaceConversion/​sessionWorkspaceConversionContribution.ts Hydrates supplied transition data.
src/​vs/​platform/​agentHost/​node/​agentService.ts Preloads default-session transitions, but omits them for peer and subagent restoration.
src/​vs/​platform/​agentHost/​common/​agentHostChatContributionsService.ts Extends hydration context with transitions.

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

Load transition maps from each peer or subagent chat storage while provider history is restored. Keep default-chat restoration on its existing database reference and avoid querying the parent session for child transitions.

Co-authored-by: Copilot <[email protected]>
@sandy081
Sandeep Somavarapu (sandy081) merged commit 4df1a8d into main Sep 7, 2026
53 of 54 checks passed
@sandy081
Sandeep Somavarapu (sandy081) deleted the sandy081/agents/hide-initial-workspace-transition branch September 7, 2026 16:16
@sandy081 Sandeep Somavarapu (sandy081) added the ~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch label Sep 7, 2026
@vs-code-engineering vs-code-engineering Bot added this to the 1.137.0 milestone Sep 7, 2026
@vs-code-engineering vs-code-engineering Bot added release-cherry-pick Automated cherry-pick between release and main branches and removed ~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch labels Sep 7, 2026
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Oct 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-cherry-pick Automated cherry-pick between release and main branches

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants