Skip to content

Comments

Chat sign-in: auto-enable GitHub Authentication extension if silently disabled#296303

Merged
bpasero merged 5 commits intomainfrom
copilot/fix-6154722-41881900-4cf7eceb-5b1d-461e-b862-d736427f8016
Feb 20, 2026
Merged

Chat sign-in: auto-enable GitHub Authentication extension if silently disabled#296303
bpasero merged 5 commits intomainfrom
copilot/fix-6154722-41881900-4cf7eceb-5b1d-461e-b862-d736427f8016

Conversation

Copy link
Contributor

Copilot AI commented Feb 19, 2026

When the built-in vscode.github-authentication extension gets silently disabled, Copilot Chat sign-in fails with a confusing error and no clear remediation path.

Changes

  • src/vs/base/common/product.ts — Added providerExtensionId: string to IDefaultChatAgent to identify the extension backing the auth provider.
  • product.json — Set "providerExtensionId": "vscode.github-authentication" in defaultChatAgent.
  • chatSetupController.ts — Added maybeEnableAuthExtension(), called at the top of signIn():
    • Looks up the auth extension in extensionsWorkbenchService.local
    • If its enablementState is DisabledGlobally or DisabledWorkspace, re-enables it via setEnablement() and restarts extension hosts via updateRunningExtensions() so the auth provider registers before the sign-in attempt proceeds
    • Only acts on user-controlled disabled states — does not override DisabledByMalicious, DisabledByTrustRequirement, or other system-managed states
Original prompt

This section details on the original issue you should resolve

<issue_title>Chat sign-in should automatically enable the GitHub Authentication extension if it's disabled</issue_title>
<issue_description>We've seen cases where the built-in GitHub Authentication extension gets silently disabled (#296170). When this happens, users can't sign in to Copilot Chat and get confusing errors with no clear path to fix it.

The chat setup / sign-in flow should automatically re-enable the GitHub Authentication extension if it detects it's disabled, rather than failing silently.

References:

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…sabled

Co-authored-by: TylerLeonhardt <2644648+TylerLeonhardt@users.noreply.github.com>
Copilot AI changed the title [WIP] Chat sign-in should automatically enable the GitHub Authentication extension if it's disabled Chat sign-in: auto-enable GitHub Authentication extension if silently disabled Feb 19, 2026
@TylerLeonhardt TylerLeonhardt marked this pull request as ready for review February 20, 2026 03:51
Copilot AI review requested due to automatic review settings February 20, 2026 03:51
@vs-code-engineering vs-code-engineering bot added this to the February 2026 milestone Feb 20, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses an issue where users cannot sign in to Copilot Chat when the built-in GitHub Authentication extension (vscode.github-authentication) becomes silently disabled. The solution automatically re-enables the extension during the chat sign-in flow.

Changes:

  • Added providerExtensionId configuration to identify the auth provider extension backing the chat agent
  • Implemented maybeEnableAuthExtension() function to detect and re-enable disabled auth extensions
  • Integrated auto-enablement into both the sign-in flow (chatSetupController.ts) and the request forwarding flow (chatSetupProviders.ts)

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/vs/base/common/product.ts Added providerExtensionId: string field to IDefaultChatAgent interface to identify the auth provider extension
product.json Set providerExtensionId to "vscode.github-authentication" for the default chat agent configuration
src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.ts Implemented maybeEnableAuthExtension() to detect and re-enable disabled auth extensions, only acting on user-controlled disabled states
src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.ts Integrated maybeEnableAuthExtension() into the sign-in flow to ensure auth extension is enabled before sign-in attempts
src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.ts Integrated maybeEnableAuthExtension() into request forwarding flow with token refresh when extension is re-enabled

@bpasero bpasero enabled auto-merge (squash) February 20, 2026 08:32
@bpasero bpasero merged commit 39e42e1 into main Feb 20, 2026
18 checks passed
@bpasero bpasero deleted the copilot/fix-6154722-41881900-4cf7eceb-5b1d-461e-b862-d736427f8016 branch February 20, 2026 08:32
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.

Chat sign-in should automatically enable the GitHub Authentication extension if it's disabled

3 participants