Skip to content

Copilot CLI floods Windows Credential Manager with copilot-mcp-oauth / copilot-keychain-chunk entries, causing CredWrite error 8 for other apps #5591

Backlog

Description

@jessehouwing

Summary

Copilot CLI accumulated hundreds of entries in Windows Credential Manager and never removed them. The vault reached a state where no application could write a credential. For example, az devops login failed, and so did cmdkey /add from the command line.

Environment

  • Copilot CLI 1.0.116
  • Windows, Entra ID (AzureAD) user account

Symptoms

Unable to use secure credential store in this environment.
(8, 'CredWrite', 'Not enough memory resources are available to process this command')
  • cmdkey /add:x /user:u /pass:abc fails with "Not enough memory resources are available".
  • The error occurs even for 1-character values, and for the SESSION, LOCAL_MACHINE and ENTERPRISE persistence modes.
  • Adding entries through the Credential Manager UI still worked.
  • Event Viewer showed nothing relevant (no Vault, DPAPI or LSA errors).
  • No policy blocks credential storage (DisableDomainCreds = 0).

Evidence

cmdkey /list showed 332 entries. 268 were Copilot's:

  • 135 x *.copilot-mcp-oauth
  • 133 x copilot-keychain-chunk.<n>.<n>.<n>

The other 64 entries were from other applications. The Credentials vault folder held about 120 KB.

Confirmation

I deleted only the 268 Copilot entries. Credential writes worked again immediately, using the same Python keyring WinVaultKeyring call that failed before.

Expected behavior

  • Update or overwrite existing entries instead of creating new ones.
  • Remove entries when an MCP server's auth is cleared or no longer needed.
  • Store tokens more compactly, with fewer chunked entries.
  • Handle CredWrite failures gracefully.

Workaround

cmdkey /list | Select-String 'Target:' | % {($_ -replace '.*Target:\s*','').Trim()} |
  ? { $_ -match 'copilot-mcp-oauth$|copilot-keychain-chunk\.' } | % { cmdkey /delete:$_ }

Then re-authenticate MCP servers.

Open question

It's unclear which limit was hit (entry count, total size, or something else). UI saves still worked while API writes failed.

Activity

  1. added
    area:authentication
    area:mcp
    area:platform-windows
    and removed on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:authenticationarea:mcparea:platform-windows

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions