claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

Plugin cache never refreshes - autoUpdate doesn't update what Claude reads

Open vanman2024 opened this issue 4 weeks ago • 0 comments

Problem

Plugin cache is never refreshed after initial install, even with autoUpdate: true enabled. Claude Code reads from stale cache instead of the updated marketplace folder.

Expected Behavior

When a marketplace is updated (via git pull/push or autoUpdate), Claude Code should use the new plugin content.

Actual Behavior

  1. Plugin installed → creates cache at ~/.claude/plugins/cache/{marketplace}/{plugin}/{version}/
  2. Marketplace updated (git push, autoUpdate pulls) → marketplace folder updated
  3. Claude Code still reads from stale cache, ignoring marketplace updates
  4. New session doesn't help
  5. autoUpdate: true in known_marketplaces.json has no effect on what Claude actually uses

Reproduction Steps

  1. Install a plugin from a marketplace
  2. Make a change to a command file in the marketplace folder
  3. Add a test marker: echo "<!-- TEST $(date) -->" >> ~/.claude/plugins/marketplaces/{marketplace}/plugins/{plugin}/commands/test.md
  4. Git commit and push
  5. Run the command - test marker is NOT present
  6. Check cache - cache version doesn't have the marker
  7. Delete cache folder → run command → now it works

Evidence

# Marketplace version (updated)
$ tail -1 ~/.claude/plugins/marketplaces/dev-lifecycle-marketplace/plugins/planning/commands/add-feature.md
<!-- TEST MARKER: Sat Jan 10 10:49:11 PST 2026 -->

# Cache version (stale - no marker)
$ tail -1 ~/.claude/plugins/cache/dev-lifecycle-marketplace/planning/1.0.0/commands/add-feature.md
  * Or run /implementation:execute to auto-continue

Claude Code loads the cache version, not the marketplace version.

Workaround

We found two workarounds:

1. Delete cache (forces recreation)

trash-put ~/.claude/plugins/cache/{marketplace-name}/
# Or: delete the cache folder

Next command use rebuilds cache from current marketplace state.

2. Symlink cache to marketplace (for plugin developers)

# Remove stale cache
trash-put ~/.claude/plugins/cache/dev-lifecycle-marketplace/

# Create symlinks so cache points to live marketplace
mkdir -p ~/.claude/plugins/cache/dev-lifecycle-marketplace
for plugin in foundation planning iterate quality; do
  mkdir -p ~/.claude/plugins/cache/dev-lifecycle-marketplace/$plugin
  ln -sfn ~/.claude/plugins/marketplaces/dev-lifecycle-marketplace/plugins/$plugin \
    ~/.claude/plugins/cache/dev-lifecycle-marketplace/$plugin/1.0.0
done

This makes changes immediately available without needing to delete cache.

Suggested Fix

Either:

  1. Don't use cache for local marketplaces - read directly from marketplace folder
  2. Refresh cache when marketplace updates - detect git changes and rebuild cache
  3. Add a /plugin refresh command - manual way to rebuild cache
  4. Add "dev mode" for plugin developers - bypass cache entirely

Environment

  • Claude Code version: Latest (Jan 2026)
  • OS: Linux (WSL2)
  • Marketplace: Local development marketplace with autoUpdate: true

Related

  • installed_plugins.json shows old gitCommitSha from October 2025 even though marketplace is at current commit
  • known_marketplaces.json has autoUpdate: true but it only pulls git, doesn't refresh cache

vanman2024 avatar Jan 10 '26 18:01 vanman2024