Skip to content

Enable Agent Host session prewarming by default - #348611

Merged
Vritant Bhardwaj (vritant24) merged 1 commit into
mainfrom
vritant24/enable-prewarm-default
Nov 16, 2026
Merged

Vritant Bhardwaj (vritant24) merged 1 commit into
mainfrom
vritant24/enable-prewarm-default

Conversation

@vritant24

Copy link
Copy Markdown
Member

New Agent Host Copilot chats now start their runtime and MCP servers before the first message by default, so connectors are ready sooner.

Changes

  • chat.agentHost.experimental.prewarmSessions now defaults to true (the experiment mode stays, so it can still be overridden).
  • The host-side prewarmSessions root config schema default is now true.
  • AgentHostSessionPrewarmer now treats an unset value as enabled (=== false disables), matching other default-on host keys such as autoAttachPullRequests. Without this, AHP clients that don't mirror the setting would still get prewarming off. An explicit false still opts out.

All existing prewarm gates are unchanged: active client, resolved customization enablement, folder trust, and no worktree drafts.

How to test

  1. With the setting not configured, open a new Agent Host Copilot chat in a trusted folder that has an MCP server configured.
  2. Before sending, the MCP server should already be starting (see the agent host log).
  3. Set chat.agentHost.experimental.prewarmSessions to false: new chats should no longer start anything before the first send.

Validation

  • ./scripts/test.sh --reporter dot --run src/vs/platform/agentHost/test/node/agentService.test.ts --run src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostUntitledProvisionalSessionService.test.ts --run src/vs/sessions/contrib/providers/agentHost/test/browser/localAgentHostSessionsProvider.test.ts: passed (2189 passing, 27 pending)
  • The prewarm test now also covers the unset case, which warms.
  • pnpm run oxlint on the changed files: passed

Flip `chat.agentHost.experimental.prewarmSessions` and the host-side `prewarmSessions` root config to default to true. The host prewarmer now treats an unset value as enabled, so clients that do not mirror the setting also get the new default; an explicit `false` still opts out.

Co-authored-by: Copilot <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 16, 2026 17:56
@vritant24 Vritant Bhardwaj (vritant24) added the ~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch label Nov 16, 2026
@vs-code-engineering

Copy link
Copy Markdown
Contributor

This PR will be automatically cherry-picked to release/1.147 when merged.

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.

🟢 Approval recommended

No active review issues remain for the change enabling session prewarming by default.

No open issues 🎉

What changed in this PR

Enables session prewarming by default for new Agent Host Copilot chats, allowing their runtime and MCP servers to start before the first message.

Changes:

  • Sets both the VS Code setting and host configuration schema defaults to true.
  • Treats an unset host value as enabled while preserving explicit false opt-out and existing eligibility gates.
  • Extends the prewarm test to cover enabled, disabled, and unset configurations.

No actionable findings remain.

File Description
src/​vs/​platform/​agentHost/​test/​node/​agentService.test.ts Adds coverage for prewarming when the setting is unset.
src/​vs/​platform/​agentHost/​node/​agentHostSessionPrewarmer.ts Disables prewarming only when explicitly set to false.
src/​vs/​platform/​agentHost/​common/​agentHostStarter.config.contribution.ts Enables the VS Code setting by default.
src/​vs/​platform/​agentHost/​common/​agentHostSchema.ts Aligns the host schema default with the setting.

Review effort: Balanced

@vritant24
Vritant Bhardwaj (vritant24) added this pull request to the merge queue Nov 16, 2026
Merged via the queue into main with commit a061e34 Nov 16, 2026
38 of 39 checks passed
@vritant24
Vritant Bhardwaj (vritant24) deleted the vritant24/enable-prewarm-default branch November 16, 2026 19:22
@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 Nov 16, 2026
@vs-code-engineering vs-code-engineering Bot added this to the 1.147.0 milestone Nov 16, 2026
Vritant Bhardwaj (vritant24) added a commit that referenced this pull request Nov 16, 2026
Cherry-pick of #348611 from `main`.

New Agent Host Copilot chats now start their runtime and MCP servers
before the first message by default, so connectors are ready sooner.

## Changes

- `chat.agentHost.experimental.prewarmSessions` now defaults to `true`
(the `experiment` mode stays, so it can still be overridden).
- The host-side `prewarmSessions` root config schema default is now
`true`.
- `AgentHostSessionPrewarmer` now treats an unset value as enabled (`===
false` disables), matching other default-on host keys such as
`autoAttachPullRequests`. Without this, AHP clients that don't mirror
the setting would still get prewarming off. An explicit `false` still
opts out.

All existing prewarm gates are unchanged: active client, resolved
customization enablement, folder trust, and no worktree drafts.

## How to test

1. With the setting not configured, open a new Agent Host Copilot chat
in a trusted folder that has an MCP server configured.
2. Before sending, the MCP server should already be starting (see the
agent host log).
3. Set `chat.agentHost.experimental.prewarmSessions` to `false`: new
chats should no longer start anything before the first send.

## Validation

- `./scripts/test.sh --reporter dot --run
src/vs/platform/agentHost/test/node/agentService.test.ts --run
src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostUntitledProvisionalSessionService.test.ts
--run
src/vs/sessions/contrib/providers/agentHost/test/browser/localAgentHostSessionsProvider.test.ts`:
passed (2189 passing, 27 pending)
- The prewarm test now also covers the unset case, which warms.
- `pnpm run oxlint` on the changed files: passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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.

3 participants