Fix incomplete Mission Control sandbox session discovery by davidfowl · Pull Request #341823 · microsoft/vscode · GitHub
Skip to content

Fix incomplete Mission Control sandbox session discovery - #341823

Merged
Osvaldo Ortega (osortega) merged 2 commits into
microsoft:mainfrom
davidfowl:davidfowl-agents-window-debugging
Oct 15, 2026
Merged

Osvaldo Ortega (osortega) merged 2 commits into
microsoft:mainfrom
davidfowl:davidfowl-agents-window-debugging

Conversation

@davidfowl

Copy link
Copy Markdown
Contributor

Summary

Fix missing GitHub Cloud sessions in the Agents Window:

  • Follow task pagination until the server stops advertising a next page, instead of stopping after ten pages per repository/archive scope. Preserve cancellation and partial-failure handling.
  • Identify sandbox tasks independently of their agent slug. When compute-provider metadata is missing or null, accept an explicitly managed-sandbox current environment. Continue rejecting explicitly non-sandbox compute and tasks without usable session/environment bindings.
  • Log aggregate exclusion counts at info level and individual task IDs/reasons at debug level, including tasks admitted by removing the historical agent-slug restriction. Exclusion diagnostics do not log prompts or credentials.
  • Update regression coverage for all four pagination scopes beyond ten pages, cancellation, alternate agent slugs, missing/null compute metadata, explicit non-sandbox compute, and exclusion diagnostics.
  • Fix the Windows development launcher's Node discovery to select one executable when multiple matches are installed.

The experimental cloud setting remains off by default. It was enabled only in the isolated development profile used for reproduction.

Validation

  • npm run build-fast -- --client-only — passed.
  • .\scripts\test.bat --run src\vs\workbench\contrib\chat\test\browser\remoteAgentHost\cloudSandboxApiService.test.ts --reporter dot — passed, 197 tests.
  • npm run eslint -- src\vs\workbench\contrib\chat\browser\remoteAgentHost\cloudSandboxApiService.ts src\vs\workbench\contrib\chat\test\browser\remoteAgentHost\cloudSandboxApiService.test.ts — passed.
  • git diff --check — passed before committing.
  • Live Windows Agents Window reproduction: enabled chat.agentHost.cloudSandbox.enabled, rebuilt, and reloaded. Complete discovery increased from 56 to 627 sessions after adding the managed-environment fallback; confirmed the previously missing chat in both discovery logs and the UI. Full pagination scanned approximately 7,140 tasks without truncation.
  • Full client type-check and full integration/smoke suites were not run.

How to Test

  1. Launch an Agents Window from this build and sign in to GitHub.
  2. Enable chat.agentHost.cloudSandbox.enabled and optionally set the log level to Debug.
  3. Verify sandbox session discovery follows all pages, including histories exceeding 1,000 tasks in a single repository/archive scope.
  4. Verify tasks with a managed-sandbox current environment remain discoverable when their task summary omits compute metadata or uses a different agent slug.
  5. Inspect [CloudSandboxApi] Discovery filtering summaries and per-task exclusion reasons in renderer.log.

No linked issue; investigated from a live missing-session report.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Follow every discovery page, recognize managed sandbox environments when compute metadata is missing, and report exclusion reasons without filtering by agent slug.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 15, 2026 16:45

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 blocking defects were identified; targeted regression coverage supports the changes while existing discovery safeguards remain intact.

0 open findings

What changed in this PR

Fixes incomplete GitHub Cloud session discovery in the Agents Window while keeping the feature opt-in.

Changes:

  • Removes the pagination ceiling and recognizes sandbox tasks independently of agent slug.
  • Adds filtering diagnostics and regression coverage.
  • Makes Windows launcher Node selection deterministic.
File Description
src/​vs/​workbench/​contrib/​chat/​test/​browser/​remoteAgentHost/​cloudSandboxApiService.test.ts Tests pagination, cancellation, sandbox metadata, and diagnostics.
src/​vs/​workbench/​contrib/​chat/​browser/​remoteAgentHost/​cloudSandboxApiService.ts Expands discovery and logs filtering outcomes.
src/​vs/​platform/​agentHost/​common/​cloudSandboxAgentHost.ts Updates comments explaining the historical slug and opt-in requirement.
.agents/​skills/​launch/​scripts/​launch.ps1 Selects the first matching Node executable.

🧠 Review effort: Balanced


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

@osortega
Osvaldo Ortega (osortega) marked this pull request as ready for review October 15, 2026 16:51
@osortega
Osvaldo Ortega (osortega) merged commit 1324d5a into microsoft:main Oct 15, 2026
37 of 38 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.143.0 milestone Oct 15, 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.

5 participants