Skip to content

agentHost: Reduce AH startup overhead and add gated prewarming experiments… - #338974

Draft
Vijay Upadya (vijayupadya) wants to merge 2 commits into
mainfrom
pure-damselfly
Draft

Vijay Upadya (vijayupadya) wants to merge 2 commits into
mainfrom
pure-damselfly

Conversation

@vijayupadya

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI balanced review requested due to automatic review settings September 30, 2026 19:54

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

Draft clearing can retain stale prewarm selections, and shutdown can orphan hidden prepared SDK sessions.

Review effort: Balanced
Findings: 2 Medium severity · 1 Low severity

Open (3)
What changed in this PR

Reduces Agent Host startup latency through provisional-session adoption, Git optimizations, overlapping preparation, and gated native prewarming.

Changes:

  • Adds gated Copilot SDK prewarming and startup tracing.
  • Reuses provisional sessions and propagates composer selections.
  • Optimizes Git snapshot/config resolution and expands timing telemetry.
File Description
chatUserInteractionTelemetry.test.ts Verifies timestamped TTFP logs.
agentHostUntitledProvisionalSessionService.test.ts Tests selection sync and adoption.
agentHostClientTools.test.ts Updates service mocks.
agentHostChatContribution.test.ts Tests adopted session identity.
chatServiceImpl.ts Adds startup probes.
chatUserInteractionTelemetry.ts Adds epoch timestamps.
agentHostUntitledProvisionalSessionService.ts Adds draft selection sync and adoption.
agentHostSessionListController.ts Adopts existing provisional sessions.
agentHostSessionHandler.ts Shares model mapping and adds probes.
agentHostLanguageModelProvider.ts Extracts model-selection conversion.
agentHostImportConversationStore.ts Adds non-consuming import lookup.
worktreeIsolation.test.ts Tests concurrent Git-info reads.
agentHostTiming.test.ts Tests preparation timing export.
copilotAgent.test.ts Tests gated native prewarming.
agentSideEffects.test.ts Tests preparation/checkpoint overlap.
agentHostTurnTelemetry.test.ts Tests preparation timing telemetry.
agentHostGitService.integrationTest.ts Tests clean-tree reuse.
agentHostStartupExperiment.test.ts Tests experiment safety gates.
worktreeIsolation.ts Deduplicates concurrent Git reads.
sessionDataService.ts Adds deletion probes.
copilotSessionLauncher.ts Adds SDK launch probes.
copilotAgentSession.ts Adds native tool preparation.
copilotAgent.ts Implements gated prewarming.
agentSideEffects.ts Runs provider preparation before send.
agentService.ts Adds lifecycle probes.
agentHostTelemetryReporter.ts Reports provider-preparation timing.
agentHostGitService.ts Optimizes snapshots and optionally limits Git concurrency.
agentHostTiming.ts Exports preparation timing to OTel.
agentHostTelemetry.ts Defines the preparation timing stage.
agentHostStartupExperiment.ts Defines environment-based experiment gating.
agent.ts Adds provider preparation hooks.

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

Resolve conflicts with main while preserving startup probes and current SDK launch behavior. Move draft preparation into a registered contribution, clear removed draft selections, and await hidden SDK session deletion before shutdown.

Co-authored-by: Copilot <[email protected]>
Vijay Upadya (vijayupadya) added a commit that referenced this pull request Oct 1, 2026
- Keep parseChangedPaths' JSDoc attached to it and drop a duplicated section divider.
- Share one in-flight worktree-isolation git-info read per folder (from #338974).
- Include epochMs in [ChatTTFP] trace lines to align with host timing (from #338974).

Co-authored-by: Copilot <[email protected]>
Vijay Upadya (vijayupadya) added a commit that referenced this pull request Oct 1, 2026
…turn overhead (#339016)

* agent host: attribute provider send latency and trim host-side first-turn overhead

* agent host: address review nits and share in-flight isolation git reads

- Keep parseChangedPaths' JSDoc attached to it and drop a duplicated section divider.
- Share one in-flight worktree-isolation git-info read per folder (from #338974).
- Include epochMs in [ChatTTFP] trace lines to align with host timing (from #338974).

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>

This branch has not been deployed

No deployments
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.

2 participants