Skip to content

Prevent enterprise MCP tools from disappearing after reconnect - #318606

Open
Will Stuckey (wstuckey) wants to merge 7 commits into
microsoft:mainfrom
wstuckey:wstuckey/fix-mcp-registry-refresh
Open

Prevent enterprise MCP tools from disappearing after reconnect#318606
Will Stuckey (wstuckey) wants to merge 7 commits into
microsoft:mainfrom
wstuckey:wstuckey/fix-mcp-registry-refresh

Conversation

@wstuckey

@wstuckey Will Stuckey (wstuckey) commented May 27, 2026

Copy link
Copy Markdown

Fixes #313493

Prevents enterprise-managed MCP tools from silently disappearing after network transitions by refreshing account policy data when connectivity returns and preserving known-good MCP registry data during transient lookup failures.

Verification:

  • npm run compile-check-ts-native

Copilot AI review requested due to automatic review settings May 27, 2026 18:13

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

Note

Copilot was unable to run its full agentic suite in this review.

Updates the default account provider to refresh account state when network connectivity returns, and adjusts MCP registry timestamp/value handling to better preserve cached policy data.

Changes:

  • Add a mainWindow online event listener to force-refresh the default account when the browser comes back online.
  • Initialize/fallback mcpRegistryDataFetchedAt using cached accountPolicyData.
  • Change MCP registry URL/access assignment to only occur when a registry result object is present.

Comment thread src/vs/workbench/services/accounts/browser/defaultAccount.ts Outdated
Comment thread src/vs/workbench/services/accounts/browser/defaultAccount.ts Outdated
@wstuckey

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@wstuckey Will Stuckey (wstuckey) changed the title Refresh MCP registry data on network restore Prevent enterprise MCP tools from disappearing after reconnect May 27, 2026
@wstuckey

Copy link
Copy Markdown
Author

joshspicer I'm attaching you to this because you got assigned to the related issue i opened up last month regarding this. This was a super simple fix and getting it merged would patch a huge issue with Enterprise MCPs! Thanks in advance!

@ribeiro-prd

Copy link
Copy Markdown

A very welcome fix! Great work Stuckey! Regards,

@JacobClements

Copy link
Copy Markdown

This is a very annoying issue. LGTM!

@tdolphusbiz

Copy link
Copy Markdown

This issue has been very difficult to workaround. Thanks for the fix.

@serious573

Copy link
Copy Markdown

Super painful bug, thanks for looking into it Will Stuckey (@wstuckey).

@wstuckey
Will Stuckey (wstuckey) force-pushed the wstuckey/fix-mcp-registry-refresh branch from 26cbaa0 to acadeb4 Compare June 3, 2026 13:14
@wstuckey
Will Stuckey (wstuckey) force-pushed the wstuckey/fix-mcp-registry-refresh branch from a2245f2 to 6a30aa6 Compare August 18, 2026 19:17
@wstuckey

Copy link
Copy Markdown
Author

joshspicer sorry to poke you, but can you take a look at this? getting this merged would really help my org

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.

Enterprise-managed MCP server tools silently disappear after network transition — no automatic token re-acquisition

8 participants