Repository navigation
agentHost: enable multi-root by default - #342188
Merged
roblourens merged 3 commits intoOct 16, 2026
Merged
Conversation
Remove the Copilot, Claude, and Codex multi-root settings and provider gates so all three providers always advertise multiple working directories. Update directory handling, tests, and documentation for unconditional support. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Committed Copilot prompt baselines still expect the old tool schema and must be regenerated and validated.
1 open issue
What changed in this PR
Enables multi-root support by default for Copilot, Claude, and Codex agent-host sessions while retaining capability-based client interoperability.
Changes:
- Removes experimental multi-root settings and host flags.
- Uses additional workspace roots without opt-in gates.
- Updates tests, integration setup, and documentation.
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostUntitledProvisionalSessionService.test.ts | Updates capability-change comments only. |
| src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostUntitledProvisionalSessionService.ts | Simplifies the capability-rebinding comment only. |
| src/vs/platform/agentHost/test/node/providerIntegration/codexSandbox.integrationTest.ts | Removes sandbox test opt-in setup. |
| src/vs/platform/agentHost/test/node/e2e/suites/workingDirectoriesSuite.ts | Removes multi-root flag setup and restoration. |
| src/vs/platform/agentHost/test/node/e2e/suites/hostFeaturesSuite.ts | Removes completion-test opt-in setup. |
| src/vs/platform/agentHost/test/node/e2e/providers/codexAgentHostE2E.integrationTest.ts | Tests secondary-root skills without opt-in. |
| src/vs/platform/agentHost/test/node/copilotAgent.test.ts | Updates default capability and root-handling assertions. |
| src/vs/platform/agentHost/test/node/codex/codexPrewarmEviction.test.ts | Updates workspace-root and single-folder coverage. |
| src/vs/platform/agentHost/test/node/codex/codexModelRefresh.test.ts | Asserts default multi-root capability. |
| src/vs/platform/agentHost/test/node/claudeAgent.test.ts | Removes opt-in setup and updates capability assertions. |
| src/vs/platform/agentHost/node/copilot/copilotAgent.ts | Removes capability, discovery, and folder-picker gates. |
| src/vs/platform/agentHost/node/codex/codexAgent.ts | Removes provider and per-session multi-root flags. |
| src/vs/platform/agentHost/node/claude/claudeAgent.ts | Always advertises capability and enables folder decisions. |
| src/vs/platform/agentHost/common/agentService.ts | Removes setting identifiers. |
| src/vs/platform/agentHost/common/agentHostStarter.config.contribution.ts | Removes setting registrations. |
| src/vs/platform/agentHost/common/agentHostSchema.ts | Removes host configuration keys and schema entries. |
| src/vs/platform/agentHost/AGENTS.md | Documents unconditional provider support. |
Review effort: Balanced
Preserve the upstream session-sync test import while removing the retired multi-root configuration flag. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Regenerate all 19 Copilot model prompt baselines in tokenless replay for the always-enabled multi-root create_session schema. The complete prompt suite passes strict replay with 24 tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Connor Peet (connor4312)
approved these changes
Oct 16, 2026
roblourens
marked this pull request as ready for review
October 16, 2026 23:17
roblourens
deleted the
roblou/agents/enable-agent-host-multi-root-default
branch
October 16, 2026 23:17
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: TylerLeonhardtMatched files:
|
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.

Summary
Enable multi-root support unconditionally for Copilot, Claude, and Codex agent-host sessions rather than retaining experimental opt-in switches.
chat.agentHost.*Agent.multiRootEnabledsettings and their host-side configuration flags.multipleWorkingDirectoriesand use additional roots for SDK launch/resume, customization discovery, and folder selection.create_sessiontool schema.Validation
Passed locally on macOS:
npm run build-fast -- --client-onlynpm run typecheck-clientgit diff --name-only --diff-filter=ACM -z -- '*.ts' | xargs -0 npm run eslint --— all 16 changed TypeScript files passed; subsequently edited test files were linted again.git diff --checkAffected unit suites: 1,326 passed, 1 skipped:
Strict-replay multi-root completion tests: 9 passed:
./scripts/test-integration.sh --reporter dot \ --run src/vs/platform/agentHost/test/node/e2e/providers/copilotAgentHostE2E.integrationTest.ts \ --grep 'multi-root file completion|empty multi-root file completion|duplicate basenames in separate roots|duplicate working directory URIs|overlapping roots|non-file roots|colliding root basenames|multi-root relative path query'Strict-replay lifecycle tests across all three providers, plus Codex secondary-root skill coverage: 7 passed:
Complete Copilot prompt suite after regenerating the baselines: 24 passed in strict replay, with no recording or snapshot-update flags:
After merging current
main, client build, type-check, and conflict-resolved test lint passed again. Focused multi-root and session-sync coverage: 7 passed:env -u COPILOT_HOME ./scripts/test.sh --reporter dot \ --run src/vs/platform/agentHost/test/node/copilotAgent.test.ts \ --grep 'multipleWorkingDirectories|additional roots|computeFolderPickerDecision|session.sync|session sync'The initial build encountered stale installed SDK/runtime versions;
npm run install-fastrestored matching dependencies. The unit suites require unsetting inheritedCOPILOT_HOMEso their fixtures do not resolve into the developer's real session storage.Cross-platform Azure validation, the full E2E suite, and real-provider sandbox integration tests have not been run locally.
CI
All current-head GitHub workflows passed: Code OSS, Component Fixtures, CodeQL, Monaco Editor checks, Telemetry, and chat-lib tests. Code OSS covers Windows, Linux, and macOS. Its macOS WebKit unit job passed on a targeted retry after an unrelated chat-pet pixel-equivalence assertion failed; the exact assertion also passed in a focused local WebKit run.
Manual Testing
Open a multi-root workspace and create a new Copilot, Claude, or Codex agent-host session without configuring a multi-root setting. Verify that the session includes the workspace folders and offers file completions and customizations from its selected roots. Verify that a single-folder session continues to use only its selected folder.
(Written by Copilot)