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

Ouverte
#5,591 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
48/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
python
Domaine
backend, security

Piste de recherche

Start by tracing how Copilot CLI stores MCP OAuth credentials and keychain chunks in Windows Credential Manager; the issue does not name source files or tests, so locate the credential storage and auth cleanup entry points first. Reproduce the reported accumulation if possible, then inspect how entries are created, updated, and removed. Done means credential entries do not accumulate across auth updates or clearing, and CredWrite failures are handled gracefully.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

area:authentication area:mcp area:platform-windows

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.

Langage dominant
Python
Étoiles
11.5k
Forks
2k
Merge moyen
6 h 34 min
PR mergées (30 j)
3

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de github/copilot-cli

Toutes les issues de github/copilot-cli

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.