Skip to content

MCP auth in Agent Sessions: "Authenticate" notification link is a no-op (targets sessions.html), and the whole auth flow completes silently #327640

Closed

Description

  • Copilot Chat Extension Version: 0.58.0 (bundled copilot-chat)
  • VS Code Version: 1.130.0 (1b6a188)
  • OS Version: macOS 26.5.2 (25F84)
  • Feature: Agent Sessions + GitHub MCP server authentication
  • Selected model: Claude Fable 5
  • Logs: observations timestamped below; can provide logs privately

Summary

When the GitHub MCP server needs (re-)authentication in Agent Sessions, the
user-facing flow gives zero feedback in either direction — the notification
action is a dead link, and even a successful sign-in completes without any
confirmation:

  1. The "Authenticate" notification action is a no-op. Sessions repeatedly
    show the notification "The MCP server GitHub requires authentication.
    [Authenticate]". The action's link target is
    vscode-file://…/vs/sessions/electron-browser/sessions.html — it points
    back into the sessions webview itself, not at an auth flow. Clicking it
    dismisses the notification with no visible effect: no browser/OAuth window,
    no account picker, no progress, no error.
  2. The Command Palette route is equally silent. Going through
    MCP: List Servers → (GitHub) → sign in also completed with no prompt
    and no confirmation
    — no toast, no status change visible at the time. The
    only way to tell it worked was watching the session's tool inventory
    eventually come back.
  3. So when auth does succeed server-side, the user can't tell. In one session
    the GitHub MCP tools flapped (available → removed ×3 → restored over ~7
    minutes, 08:45–08:52 local) while other sessions kept showing the
    Authenticate notification. Then ~9 minutes later (09:01) the tools dropped
    again and the notification returned: a prompt → sign-in → brief reconnect →
    drop cycle, with the user blind at every step.

Steps to reproduce

  1. Agent Sessions window with several Copilot CLI sessions using the GitHub
    MCP server; let the MCP auth expire or drop.
  2. Observe the "requires authentication" notification; click Authenticate.
  3. Notification dismisses; nothing else happens (link target is
    sessions.html).
  4. Sign in via MCP: List Servers instead — completes with no feedback.
  5. Watch tools flap back and later drop again, notification returns.

Expected

  • The Authenticate action launches (or focuses) the actual auth flow.
  • Sign-in — from the notification or the Command Palette — reports its outcome:
    progress while running, a success confirmation (or at least the server
    status flipping visibly), an error if it failed.
  • Sessions stop prompting once auth has succeeded.

Notes

Activity

  1. Ben-Home commented on Jul 27, 2026

    @Ben-Home

    Confirming this on VS Code 1.130.0 — the MCP OAuth flow in Agent Sessions has two distinct gaps:

    1. The dead "Authenticate" link: The notification targets sessions.html which isn't a real route. This should point to the actual OAuth callback handling — in the MCP extension host, this is typically vscode://copilot/mcp-oauth/callback or the equivalent registered URI handler. The notification action is likely connected to the wrong handler.

    2. Silent completion: Even when the browser-based OAuth flow succeeds (the provider redirects back with a code, the extension host exchanges it for tokens), there's zero user-facing confirmation. The agent session just starts working — which is fine for the happy path, but when the flow silently fails (expired code, DCR registration rejected), the user has no idea what happened.

    Root cause suspicion: The MCP auth in Agent Sessions may be using a different code path than the standard MCP server auth in VS Code's settings UI (chat.mcp.servers). The settings-based flow has visible status indicators (spinner → checkmark); the Agent Sessions flow appears to skip these entirely.

    Quick debug path for the reporter: Check DevTools > Console for [MCP Auth] prefixed log messages during the flow. If none appear, the auth handler isn't being invoked at all for the Agent Sessions path.

  2. chalin commented on Aug 14, 2026

    @chalin
    Author

    Update, 2026-08-14 (VS Code 1.133.0, macOS 26.6.1): the failure mode has hardened from an auth-drop cycle into "server never starts", with no user-visible path back to a working state.

    • Through ~08-11, Copilot CLI process logs (~/.copilot/logs/) show repeated fatal auth errors against the built-in GitHub MCP server: [rust:rmcp::transport::worker] worker quit with fatal: Transport channel closed, when Client(OAuthChallenge { … error_description="No access token was provided in this request", resource_metadata="https://api.githubcopilot.com/.well-known/oauth-protected-resource/mcp/" … status_code: 401 … }). GitHub tools were still registering between drops.
    • Since ~08-12, new process logs contain zero MCP activity: the runtime no longer attempts the connection, and no session gets GitHub MCP tools (verified from inside a session via tool search).
    • The "requires authentication" notification no longer appears either: the whole cycle this issue described has gone quiet, leaving only the dead server.
    • The MCP Servers list (Agent Customizations) still shows the built-in GitHub server, but its context menu offers only Disable / Disable (Workspace): no authenticate, sign-in, or restart action.
    • Probable local trigger, for context: a keychain incident on this machine (~07-24) left older login-keychain entries unreadable (new keychain reads and writes work fine), so the stored token was likely lost. That explains the 401s, but it makes this issue's feedback gaps load-bearing: with the token gone, none of the re-auth affordances (notification action, palette sign-in, server context menu) provides a working, or even observable, path to re-establish it.
    • On the persistence half deferred to Agents window repeatedly prompts for MCP authentication after extension host restart #327137: this machine has since moved from 1.130 to 1.133 and the earlier prompt/drop cycle no longer occurs, but that is moot given the harder failure above.
  3. chalin commented on Aug 14, 2026

    @chalin
    Author

    Root-cause investigation split out to #330837: the agent-host → Copilot CLI credential handoff never recovers after a token-loss event (no retry, no reset affordance, silent failure). This issue remains scoped to the auth-flow feedback gaps (no-op Authenticate action, silent sign-in), which are still present in 1.133.0 and would apply whenever that flow is exercised.

  4. alexdima commented on Nov 9, 2026

    @alexdima
    Member

    Thanks for the detailed report. I checked this on Insiders 1.146.0-insider (29ce94a) on macOS, signed in, with a local MCP server that requires OAuth. It's fixed:

    • Authenticate in the session does something now. Clicking it opens the browser sign-in and shows "Authenticating fakeauth…" in the chat. After sign-in the server starts and the session gets its tools. Fixed by Authenticate MCP servers outside active turns #326881 and the later fixes for the MCP Authenticate action in the Agents window.
    • MCP: List Servers. A server that needs sign-in shows "Authentication required", and its menu has Authenticate, which starts the browser flow. Afterwards the server shows Running.
    • The server menu has Authenticate (and Stop Server / Show Output) while sign-in is needed, not just Disable.

    Not covered: success is only announced to screen readers (the visible "Authenticating…" line just goes away and the server shows Running). If the turn ends before you click Authenticate, the prompt goes away with it, and you have to use List Servers. The credential handoff itself is tracked in #330837.

    Closing as fixed. If you still see a no-op Authenticate on a current build, please reopen with the steps.

    327640-mcp-auth-insiders.mp4

    327640-authenticating-inline.png

    327640-list-servers-authenticate.png

    🤖 Authored with GitHub Copilot on behalf of Alexandru Dima (@alexdima).

  5. added this to the 1.146.0 milestone on Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions