Skip to content

agentHost: Own SDK auto-download preference - #334316

Merged
TylerLeonhardt merged 14 commits into
mainfrom
tyleonha/agent-sdk-download-offer
Sep 5, 2026
Merged

agentHost: Own SDK auto-download preference#334316
TylerLeonhardt merged 14 commits into
mainfrom
tyleonha/agent-sdk-download-offer

Conversation

@TylerLeonhardt

@TylerLeonhardt TylerLeonhardt commented Sep 3, 2026

Copy link
Copy Markdown
Member

Fixes #334675.

Summary

  • Offer the Agent Host SDK download whenever the SDK is missing, independent of GitHub sign-in, entitlement resolution, or the signed-out experiment.
  • Persist each SDK's download-on-use consent in the Agent Host's agent-host-storage.json, on the machine that owns the SDK cache.
  • Record consent only when the user clicks Download or an agent turn actually starts a lazy SDK download; never infer consent from cache presence.
  • Never prefetch an SDK at Agent Host startup: remembered consent suppresses repeat prompting, and the download begins only when an agent turn actually needs the SDK.
  • Serialize setup initialization, consent, explicit downloads, lazy completion, and reload refreshes through one Sequencer and one download-activity state; duplicate explicit requests short-circuit before entering the queue.
  • Keep status publication inside the setup channel: providers request a fresh serialized probe instead of publishing previously computed SDK-readiness values.
  • Failed downloads return to the explicit offer without retrying in a loop; the workbench only renders host-reported setup state and sends explicit requests.

Testing

  • npm run transpile-client

  • npm run typecheck-client

  • npm run eslint -- <changed TypeScript files>

  • .\scripts\test.bat --run src\vs\platform\agentHost\test\common\agentSdkSetup.test.ts --run src\vs\platform\agentHost\test\node\agentSdkSetupChannel.test.ts --run src\vs\platform\agentHost\test\node\agentConfigurationService.test.ts --run src\vs\platform\agentHost\test\node\agentSdkDownloader.test.ts --run src\vs\platform\agentHost\test\node\agentHostServices.test.ts (64 passing)

  • .\scripts\test.bat --run src\vs\platform\agentHost\test\node\claudeAgent.test.ts --run src\vs\platform\agentHost\test\node\codex\codexModelRefresh.test.ts --grep "agent SDK setup channel" (18 passing)

  • .\scripts\test.bat --run src\vs\platform\agentHost\test\node\codex\codexModelRefresh.test.ts --grep "restored model waits|queues a fresh model refresh" (2 passing)

  • .\scripts\test.bat --run src\vs\workbench\contrib\chat\test\browser\agentSessions\agentHostSdkSetupNotification.test.ts (36 passing)

  • .\scripts\test-integration.bat --run src\vs\platform\agentHost\test\node\claudeAgent.integrationTest.ts (5 passing)rnrnFull npm run compile remains locally blocked by an unrelated stale @vscode/markdown-editor API mismatch; main-source typecheck and transpilation pass.

SDK notification follow-up

Fixes #334668. Includes the notification fix from #334672.

  • Explain that users can click Download or send a message when models are available for the agent.
  • Update the visible notification as models appear or disappear, while preserving the required-download wording when no models are available and always keeping Download.

Follow-up validation: 45 targeted SDK setup notification and session target picker tests passed, along with transpilation, ESLint, and hygiene checks.

Copilot AI balanced review requested due to automatic review settings September 3, 2026 16:48

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

Existing session and window gates still prevent signed-out users from reaching the offer when the experiment is disabled.

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

Review tier: Balanced
Findings: 1 Medium severity

New issues introduced by this change (1)
Severity Finding
Medium severity src/​vs/​workbench/​contrib/​chat/​browser/​agentSessions/​agentHost/​agentHostSdkSetupNotification.ts — This does not make the offer independent of the signed-out experiment end to end. The notification…
What changed in this PR

Moves Agent Host SDK download offers ahead of sign-in, entitlement, and experiment checks.

Changes:

  • Offers missing SDK downloads to all users.
  • Keeps missing-account guidance behind existing signed-out checks.
  • Adds state-transition tests.
File Description
agentHostSdkSetupNotification.ts Reorders setup-state decisions.
agentHostSdkSetupNotification.test.ts Tests independent download offers.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Base: d4471383 Current: 168a976a

No screenshot changes.

TylerLeonhardt and others added 2 commits September 3, 2026 15:52
Check for a missing SDK before account, entitlement, and signed-out experiment gates so every user can consent to the required download. Keep missing-account guidance behind the existing signed-out checks and cover both sides of the decision boundary.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Publish lazy SDK download lifecycle through the setup channel so first use dismisses the download offer and refreshes setup after completion. Persist the same standing consent as the Download action and bound failed retries to one attempt per window.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@TylerLeonhardt
TylerLeonhardt force-pushed the tyleonha/agent-sdk-download-offer branch from ae72f5e to 781fc7e Compare September 3, 2026 22:54
@TylerLeonhardt TylerLeonhardt changed the title agentHost: Offer SDK download independent of sign-in agentHost: Unify SDK download consent paths Sep 3, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@TylerLeonhardt TylerLeonhardt changed the title agentHost: Unify SDK download consent paths agentHost: Own SDK auto-download preference Sep 4, 2026
TylerLeonhardt and others added 6 commits September 4, 2026 10:23
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@TylerLeonhardt
TylerLeonhardt marked this pull request as ready for review September 4, 2026 23:48
@TylerLeonhardt
TylerLeonhardt enabled auto-merge (squash) September 4, 2026 23:48
@TylerLeonhardt

Copy link
Copy Markdown
Member Author

I also ran a full build and verified this did what it should

Explain download-on-use when models are available, react to model availability changes, and preserve the Download action and no-model wording.

Fixes #334668

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
TylerLeonhardt and others added 2 commits September 4, 2026 17:38
Use the Sessions-owned unified workspace picker setting in the Copilot provider and its tests, resolving the compiler errors and legacy-action test failures introduced by concurrent main changes.

Refs #334554 and #334591.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the upstream import placements after merging #334677, removing duplicate-identifier compilation errors from the provider and its tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@TylerLeonhardt
TylerLeonhardt merged commit e3c3c45 into main Sep 5, 2026
60 of 61 checks passed
@TylerLeonhardt
TylerLeonhardt deleted the tyleonha/agent-sdk-download-offer branch September 5, 2026 02:10
@vs-code-engineering vs-code-engineering Bot added this to the 1.137.0 milestone Sep 5, 2026
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.

agentHost: Always offer SDK download when the SDK is missing agentHost: Adapt SDK download notification when models are available

3 participants