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

オープン
#5,591 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
backend, security

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Python
スター
11.5k
フォーク
2k
平均マージ
6時間 34分
マージ済み PR(30日)
3

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

github/copilot-cli のほかの issue

github/copilot-cli の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。