Skip to content

agentHost: remember configured MCP auth grants - #326736

Merged
Connor Peet (connor4312) merged 1 commit into
mainfrom
fix/agenthost-remember-mcp-auth
Jul 20, 2026
Merged

Connor Peet (connor4312) merged 1 commit into
mainfrom
fix/agenthost-remember-mcp-auth

Conversation

@connor4312

Copy link
Copy Markdown
Member

Previously configured OAuth clients could not reactivate their persisted dynamic authentication provider during the noninteractive MCP authentication pass. This caused the authorization prompt to appear even though the interactive pass immediately found the existing session.

This restores a matching persisted provider during the automatic pass while continuing to require interaction for new or changed OAuth clients.

Tests:

  • VS Code build/typecheck
  • agentHostAuth unit tests (28 passing)
  • npm run valid-layers-check
  • npm run precommit

Restore persisted dynamic authentication providers during noninteractive MCP authentication so previously allowed sessions can be reused without showing an authorization prompt.\n\nCo-authored-by: Copilot <[email protected]>
Copilot AI review requested due to automatic review settings July 20, 2026 23:01
@connor4312
Connor Peet (connor4312) enabled auto-merge (squash) July 20, 2026 23:01

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.

Pull request overview

Restores persisted MCP OAuth providers during noninteractive authentication when configured client credentials still match.

Changes:

  • Reactivates matching persisted dynamic authentication providers.
  • Preserves interactive authorization for new or changed OAuth clients.
  • Adds regression coverage for automatic provider restoration.
Show a summary per file
File Description
agentHostAuth.ts Restores matching persisted OAuth providers.
agentHostAuth.test.ts Tests noninteractive restoration and token forwarding.

Review details

  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Medium

@connor4312
Connor Peet (connor4312) merged commit 73dfdae into main Jul 20, 2026
30 checks passed
@connor4312
Connor Peet (connor4312) deleted the fix/agenthost-remember-mcp-auth branch July 20, 2026 23:41
@vs-code-engineering vs-code-engineering Bot added this to the 1.131.0 milestone Jul 20, 2026
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Sep 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants