Plugin cache not invalidated when marketplace is updated - stale paths used

Resolved 💬 3 comments Opened Dec 12, 2025 by discreteds Closed Dec 16, 2025

Summary

When a plugin is installed via /plugin install and later the marketplace is updated, Claude Code continues to use the stale cached version instead of the updated marketplace version. This causes skills to reference outdated files.

Steps to Reproduce

  1. Add a marketplace: /plugin marketplace add owner/repo
  2. Install a plugin: /plugin install plugin-name@marketplace-name
  3. Plugin is cached at ~/.claude/plugins/cache/{marketplace}/{plugin}/{version}/
  4. Later, update the marketplace (push changes to the repo)
  5. Marketplace syncs to ~/.claude/plugins/marketplaces/{marketplace}/
  6. Invoke a skill from the plugin
  7. Bug: Skill loads from the old /cache/ path, not the updated /marketplaces/ path

Expected Behavior

When a marketplace is updated, any plugins installed from that marketplace should either:

  • Use the updated files from /marketplaces/
  • Invalidate/update the cached version in /cache/
  • Prompt the user to reinstall

Actual Behavior

  • installed_plugins.json retains the old /cache/ path
  • known_marketplaces.json has the new /marketplaces/ path
  • Skill invocation uses installed_plugins.json → stale files

Evidence

installed_plugins.json (stale):

"hiivmind-pulse-gh@hiivmind-pulse-gh": [{
  "installPath": "/home/user/.claude/plugins/cache/hiivmind-pulse-gh/hiivmind-pulse-gh/3.0.0",
  "installedAt": "2025-12-08T20:24:57.868Z",
  "gitCommitSha": "9a54d2e..."
}]

known_marketplaces.json (current):

"hiivmind-pulse-gh": {
  "installLocation": "/home/user/.claude/plugins/marketplaces/hiivmind-pulse-gh",
  "lastUpdated": "2025-12-12T13:20:52.287Z"
}

Skill invocation message:

Base directory for this skill: /home/user/.claude/plugins/cache/hiivmind-pulse-gh/hiivmind-pulse-gh/3.0.0/skills/...

This caused the skill to reference files that exist in the marketplace version but not in the cached version.

Impact

  • Users get confusing "file not found" errors for files that clearly exist in the repo
  • Plugin updates don't take effect until manual reinstall
  • Hard to diagnose - two different locations with same plugin name

Workaround

Manually re-run /plugin install plugin-name@marketplace-name to refresh the cache.

Environment

  • Claude Code CLI
  • Ubuntu 25.10
  • gh version 2.83.1

Suggested Fix

Options:

  1. When marketplace updates, invalidate matching entries in installed_plugins.json
  2. Check marketplace lastUpdated vs plugin installedAt and prefer newer
  3. Unify storage - don't maintain separate /cache/ and /marketplaces/ copies
  4. Add /plugin refresh command to sync installed plugins with marketplace updates

View original on GitHub ↗

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