Marketplace-backed npm plugin install/update can use stale local cache instead of current marketplace version

Resolved 💬 2 comments Opened Mar 23, 2026 by deeepanshu Closed Apr 21, 2026

Summary

Claude Code can install or update a stale npm-backed plugin version from a marketplace even when the marketplace metadata, npm package version, and npm dist-tags all point to a newer version.

In my case, a marketplace entry pointed to a newer prerelease plugin version, but claude plugin install / claude plugin update kept installing an older prerelease until I manually deleted local plugin cache directories under ~/.claude/plugins.

This makes marketplace-based prerelease testing unreliable and suggests Claude is reusing stale local plugin/npm cache state instead of fully honoring the marketplace source metadata.

Environment

  • Claude Code CLI: latest as of 2026-03-23
  • OS: macOS
  • Plugin source type: npm-backed marketplace entry
  • Registry: private npm registry

Marketplace entry

The marketplace entry looked like this:

"source": {
  "source": "npm",
  "package": "<private-package>",
  "version": "<newer-prerelease-version>",
  "registry": "<private-registry-url>"
}

The marketplace itself was added from the correct prerelease URL.

Evidence that upstream metadata was correct

These all matched the newer version:

  1. Marketplace view showed the plugin at the newer prerelease version.
  2. npm view <private-package>@<newer-prerelease-version> version --registry <private-registry-url> returned the newer version.
  3. npm view <private-package> dist-tags --registry <private-registry-url> showed the prerelease tag pointing to the newer version.
  4. Downloading the tarball directly showed the packaged plugin metadata was correct.

What Claude installed

Even after removing the marketplace and reinstalling it from the newer prerelease marketplace URL, Claude still installed an older prerelease version from local cache.

claude plugin update <plugin>@<marketplace> --scope user also reported the plugin was already at the latest version.

What fixed it locally

After manually deleting these local Claude plugin caches:

rm -rf ~/.claude/plugins/cache/<marketplace>
rm -rf ~/.claude/plugins/npm-cache

and then reinstalling the marketplace/plugin, Claude finally installed the newer prerelease version.

Expected behavior

  • claude plugin install / update should install the version described by the current marketplace entry, or at minimum refresh any stale local cache that would prevent that.
  • A marketplace added from a newer source URL should not continue resolving an older cached plugin package version.

Actual behavior

  • Claude continues to install an older cached plugin version until local plugin caches under ~/.claude/plugins are manually removed.

Request

Could Claude Code either:

  1. invalidate plugin-specific cache automatically when marketplace metadata changes, or
  2. provide a documented cache-clearing command / flag for marketplace-backed plugins?

This is especially painful for prerelease/RC validation, where the marketplace metadata may advance frequently but Claude continues installing an older cached build.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗