claude-code
claude-code copied to clipboard
Plugin cache never refreshes - autoUpdate doesn't update what Claude reads
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
- Plugin installed → creates cache at
~/.claude/plugins/cache/{marketplace}/{plugin}/{version}/ - Marketplace updated (git push, autoUpdate pulls) → marketplace folder updated
- Claude Code still reads from stale cache, ignoring marketplace updates
- New session doesn't help
-
autoUpdate: trueinknown_marketplaces.jsonhas no effect on what Claude actually uses
Reproduction Steps
- Install a plugin from a marketplace
- Make a change to a command file in the marketplace folder
- Add a test marker:
echo "<!-- TEST $(date) -->" >> ~/.claude/plugins/marketplaces/{marketplace}/plugins/{plugin}/commands/test.md - Git commit and push
- Run the command - test marker is NOT present
- Check cache - cache version doesn't have the marker
- 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:
- Don't use cache for local marketplaces - read directly from marketplace folder
- Refresh cache when marketplace updates - detect git changes and rebuild cache
-
Add a
/plugin refreshcommand - manual way to rebuild cache - 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.jsonshows oldgitCommitShafrom October 2025 even though marketplace is at current commit -
known_marketplaces.jsonhasautoUpdate: truebut it only pulls git, doesn't refresh cache