Repository navigation
Surface reconnect guidance for broken Copilot connectors - #350859
Draft
Martin Aeschlimann (aeschli) wants to merge 2 commits into
Draft
Martin Aeschlimann (aeschli) wants to merge 2 commits into
Martin Aeschlimann (aeschli) wants to merge 2 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
A session-server row that loses Connector ownership while remaining in Error still displays Connector-only error text instead of restoring its normal description.
1 open issue
What changed in this PR
This PR addresses #350845 by preserving reconnect guidance for broken Copilot Connectors in Agent Host and surfacing it in the Chat Customizations UI.
Changes:
- Retains specific reconnect failures across delayed ownership discovery and missing inventory.
- Keeps broken or reconnecting Connectors searchable while respecting user enablement.
- Adds live row and detail diagnostics, accessible labels, regression tests, and visual fixtures.
| File | Description |
|---|---|
src/vs/workbench/test/browser/componentFixtures/sessions/aiCustomizationManagementEditor.fixture.ts |
Adds broken-Connector row and detail fixtures. |
src/vs/workbench/contrib/chat/test/browser/aiCustomization/mcpListWidget.test.ts |
Tests live diagnostics, recovery, and late ownership updates. |
src/vs/workbench/contrib/chat/test/browser/aiCustomization/connectorPresentation.test.ts |
Tests detail error updates without replacing actions. |
src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.ts |
Displays Connector errors and supplies live detail diagnostics. |
src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedConnectorDetail.ts |
Adds a live error section to Connector details. |
src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.ts |
Passes diagnostic observables into Connector details. |
src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts |
Covers failure retention, routing, recovery, and cleanup. |
src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts |
Preserves reconnect failures and returns actionable recovery guidance. |
Review effort: Balanced
When a Connector's MCP server reports a broken connection that needs a reconnect, repair it silently with the existing authorization and restart its sessions. Show a progress state while reconnecting, and fall back to a notification with a Reconnect action when consent is needed, the servers stay broken after the restart, or they do not become ready in time. Also only show Connector error text for rows owned by a Connector. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #350845
Preserve the SDK's non-retryable reconnect failure until Connector ownership is known, and show actionable recovery guidance in tool results, MCP rows, and Connector details. Keep a broken or reconnecting Connector searchable without overriding user enablement.
Automatic reconnect
The host now reports a broken Connector connection with a distinct
errorType(copilot-connector-reconnect-required). When the workbench sees it, it tries to repair the connection without user interaction:This also addresses the review comment: Connector error text is now shown only for rows owned by a Connector.
Validation
pnpm run build-fast --client-only: passed..\scripts\test.bat --run src/vs/workbench/contrib/chat/test/browser/aiCustomization/copilotConnectorsService.test.ts --run src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostCustomizationService.test.ts --run src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts --run src/vs/workbench/contrib/chat/test/browser/aiCustomization/mcpListWidget.test.ts: passed (2152 tests).pnpm run typecheck-client: passed.node build/oxlint.ts <changed .ts files>: passed.Not run: a live recovery from a broken provider connection, and screen-reader testing. I have not verified whether the silent connect request actually repairs a connection that the provider still reports as connected; if it does not, the notification fallback applies.