Skip to content

agentHost: use static SDK tokens for Mission Control credentials - #342201

Merged
roblourens merged 1 commit into
mainfrom
roblou/agents/ios-app-mission-control-debug
Oct 16, 2026
Merged

roblourens merged 1 commit into
mainfrom
roblou/agents/ios-app-mission-control-debug

Conversation

@roblourens

@roblourens roblourens commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Summary

Follow-up to #341455. Mission Control's scoped tokens have a one-hour lifetime, but the SDK token-provider path requires more than one hour remaining. Pass captured Mission Control credentials through the SDK's explicit gitHubToken option instead.

  • Preserve captured expiry and observed-revocation checks before SDK launch and execution admission.
  • Keep credential sponsorship and safe-boundary rollover separate from shared desktop credentials.
  • Leave legacy local, SSH/tunnel and standalone token/provider selection and the one-hour refresh margin unchanged.
  • Document that static SDK delivery does not provide proactive renewal or revoke tokens already handed to running SDK operations.

No new setting, SDK/runtime change, or token-market exchange in VS Code.

Validation

  • npm run gulp compile-client — passed, including client type-checking.
  • npm run eslint -- src/vs/platform/agentHost/node/copilot/copilotGitHubCredentials.ts src/vs/platform/agentHost/test/node/copilotGitHubCredentials.test.ts src/vs/platform/agentHost/test/node/copilotAgent.test.ts — passed.
  • env -u COPILOT_HOME ./scripts/test.sh --run src/vs/platform/agentHost/test/node/copilotGitHubCredentials.test.ts --run src/vs/platform/agentHost/test/node/copilotAgent.test.ts --run src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts --run src/vs/platform/agentHost/test/node/copilotSessionLauncher.test.ts --grep 'CopilotGitHubCredentials|CopilotAgent scoped credentials|scoped credentials|materialization.*(GitHub|authentication|refreshable)|resumeSession relies on client authentication|updates GitHub credentials|CopilotSessionLauncher customization policy session' --reporter dot — 51 passed. An initial run with an agent-injected COPILOT_HOME failed the unchanged mock-storage-path assertion; removing that environment override restored the expected test environment.
  • git diff origin/main...HEAD --check — passed.

Repeated the real-token SDK session-creation probe after rebasing, using the currently bundled @github/copilot-sdk version 1.0.23-preview.2: a fresh token reporting 3,599 seconds remaining successfully created a session through the changed captured-credential options, with no token provider and ambient authentication disabled. The isolated probe session was disconnected and its temporary profile removed. No live model turn, disconnected-expiry/renewal scenario, or full smoke suite was run locally.

(Written by Copilot)

Pass captured Mission Control credentials as explicit SDK tokens so valid one-hour grants do not enter the provider's minimum-lifetime path. Preserve scoped expiry/revocation admission checks and legacy credential-provider behavior.

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

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.

🔵 Needs a closer look

Short-lived-token behavior has not been revalidated against the currently bundled SDK, leaving an authentication-sensitive integration gap.

No open issues 🎉

What changed in this PR

Uses explicit SDK tokens for Mission Control’s short-lived credentials, following the credential-isolation work in #341455.

Changes:

  • Replaces scoped token providers with static SDK tokens while preserving expiry and revocation checks.
  • Updates tests for short-lived credentials, isolation, and safe-boundary rollover.
  • Documents renewal limitations and unchanged legacy authentication behavior.
File Description
src/​vs/​platform/​agentHost/​test/​node/​copilotGitHubCredentials.test.ts Tests static delivery and expired/revoked credential rejection.
src/​vs/​platform/​agentHost/​test/​node/​copilotAgent.test.ts Checks scoped token isolation and rollover without providers.
src/​vs/​platform/​agentHost/​node/​missionControl/​MISSION_CONTROL.md Documents static authentication and renewal limitations.
src/​vs/​platform/​agentHost/​node/​copilot/​copilotGitHubCredentials.ts Supplies validated captured credentials through gitHubToken.

Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 8cfec587 Current: a15a4f1e

Changed (1)

sessions/chatCompositeBar/OverflowingTabs/Light
Before After
before after

@roblourens
roblourens merged commit e136d87 into main Oct 16, 2026
50 checks passed
@roblourens
roblourens deleted the roblou/agents/ios-app-mission-control-debug branch October 16, 2026 23:20
@vs-code-engineering vs-code-engineering Bot added this to the 1.143.0 milestone Oct 16, 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.

3 participants