Skip to content

Windows: stale copilot-keychain-chunk credentials accumulate and can exhaust Credential Manager #5473

Backlog

Description

@robin-furner

Summary

On Windows, copilot-keychain-chunk.* entries appear to accumulate in Windows Credential Manager without being cleaned up. Once the per-user vault is full, every application on the machine fails to store credentials, which broke an unrelated tool's login.

Observed

  • Windows Credential Manager contained ~180 copilot-keychain-chunk.<hash>.<uuid>.<n> generic credentials (about two thirds of all entries in the vault).
  • CredWrite from an unrelated process failed with Win32 error 8 (ERROR_NOT_ENOUGH_MEMORY, "Not enough memory resources are available to process this command") even for a ~1 KB blob. Free RAM was not an issue.
  • An unrelated CLI that stores its OAuth token in Credential Manager then failed with an error mentioning "OS keyring is not reachable ... Not enough memory resources".
  • After deleting all copilot-keychain-chunk.* entries (vault went from 265 to 83 entries), writes succeeded again.

Suspected cause (inference, not confirmed)

Secrets are split into chunks, and when a secret is rewritten or refreshed (for example MCP OAuth tokens), the previous chunk set is not deleted. Failed or interrupted writes may also strand chunks. The middle UUID segment looks like a per-write version id.

Suggested fix

  1. On write: write the new chunks, update the index or pointer, then delete the old chunk set only after success.
  2. On startup: sweep and delete any copilot-keychain-chunk.* entry not referenced by a current index.
  3. Surface a clear warning when a credential write fails with a resource or quota error (related: Windows credential-storage failures need operation-level diagnostics and an accurate warning #5399).

Environment

  • Windows 11
  • Multiple MCP servers configured (several using OAuth)
  • Not sure whether the writer is the CLI or the desktop app; both may share this storage code. Please re-label or transfer if this is the wrong repo.

Activity

  1. added
    area:authenticationLogin, OAuth, device auth, token management, and keychain integration
    area:mcpMCP server configuration, discovery, connectivity, OAuth, policy, and registry
    area:platform-windowsWindows-specific: PowerShell, cmd, Git Bash, WSL, Windows Terminal
    and removed on Nov 17, 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:authenticationLogin, OAuth, device auth, token management, and keychain integrationarea:mcpMCP server configuration, discovery, connectivity, OAuth, policy, and registryarea:platform-windowsWindows-specific: PowerShell, cmd, Git Bash, WSL, Windows Terminal

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions