[BUG] /plugin update does not invalidate plugin cache
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When running /plugin update, the marketplace git repository is updated correctly, but the plugin cache in ~/.claude/plugins/cache/ is not cleared or updated. The installed_plugins.json file also retains the old gitCommitSha.
This means updated plugin files are not reflected until the cache is manually deleted.
What Should Happen?
Plugin cache should be invalidated or updated when /plugin update is run, so that changes in the marketplace are reflected immediately.
Error Messages/Logs
No error messages - the command reports success but cache remains stale.
Evidence:
- ~/.claude/plugins/marketplaces/ - Updated (git pull works) ✓
- ~/.claude/plugins/cache/ - Not updated (old files remain) ✗
- ~/.claude/plugins/installed_plugins.json - gitCommitSha not updated ✗
Steps to Reproduce
- Add a private marketplace hosted on GitLab:
/plugin marketplace add git@gitlab.com:your-org/your-marketplace.git
- Install a plugin from the marketplace:
/plugin install your-plugin@your-marketplace
- Make changes to the plugin in the marketplace repository (e.g., update commands or agents)
- Run
/plugin update
- Check cache directory - files remain outdated:
```bash
ls -la ~/.claude/plugins/cache/
- Compare with marketplace directory - this is updated:
cd ~/.claude/plugins/marketplaces/your-marketplace && git log -1
Workaround: Manually delete cache directory:
rm -rf ~/.claude/plugins/cache/
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.69 (Claude Code)
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Windows Terminal
Additional Information
Reporter: Claude Code 2.0.69 🤖
24 Comments
is there a workaround until it gets fixed? which files should be removed
+1
@nikitakot Deleting the stale plugin cache resolves the issue:
After clearing, restart Claude Code and the plugins will be reinstalled from the updated marketplace repo.
Note: Even with
"autoUpdate": trueset in~/.claude/plugins/known_marketplaces.json, the cache is not invalidated when the marketplace repo is updated viagit pull.I'd add that the workaround submitted by the OP doesn't address the entries that remain in
~/.claude/plugins/installed_plugins.json. At least for me, it doesn't appear to cause any error messages, but it also seems that a "clean" update would account for thisThis bug is still present in Claude v2.0.74
/plugin(no content)message:<img width="157" height="56" alt="Image" src="https://github.com/user-attachments/assets/dcf75a77-ffa9-4741-923d-4ca49466a053" />
In the meantime, I wrote my own helper script for manually updating plugins using git:
update_plugins.py. A preview:We ran into this issue and created a "one and done" solution for our gopher-ai marketplace.
Our approach:
git fetch && reset --hard origin/mainon the marketplace repo (updates source)*@gopher-aiplugin entries frominstalled_plugins.jsonusing jqAfter running, just restart Claude Code - no need to re-add the marketplace. Plugins are automatically reinstalled from the updated
marketplace.json.Key differences from other approaches:
git reset --hardinstead of deleting/re-cloning (always works, even if local diverged)/refresh-pluginsClaude Code commandScript: refresh-plugins.sh
One-liner:
You can adapt this for your own marketplace by changing the marketplace name in the script. The jq filter
endswith("@your-marketplace")makes it easy to target any marketplace.Hope this helps!
+1. It looks like I can only reinstall; the "update" function isn't well yet.
I'm running into _something_ like this where the marketplace is cloned and the cache also contains the plugins, so my hooks are running twice because they exist in two places. Maybe closer to #15621, but maybe same root cause.
I'm running into this issue as I develop local plugins (v2.1.5)
I"m still running into this today on 2.1.29 (Claude Code) on macOS.
same problem here!
same problem here!
I've stopped using Claude plugins. They are buggy. I recommend using
npx skills addinstead:Same thing happens with
/reload-plugins. As I understood this feature is supposed to reload the files so that if I change some configuration in~/.claude/plugins/marketplaces/my-marketplace/my-plugin, it should be reflected in Claude Code without having to restart the session.As of now, the plugin is always reloaded from the cache so the only way to see the changes is to delete the corresponding folder (
~/.claude/plugins/cache/my-plugin)same. very frustrating for sure.
+1 — /plugin update successfully pulling the repo but not invalidating the cache is the root cause of most of our plugin frustration. The update command should be the single source of truth for 'my plugins are current.'
+1
/reload-plugins and /plugin update aren't functional, even manually clearing cache etc. doesn't work. Each session still separately somehow cache plugins with each session.
the only way to update to latest versions is by full exit and resume which costs tokens and is a difficult feedback loop when developing ad-hoc plugins/mcp-servers/etc.
+1
The bug is real. Confirmed.
Adding a concrete reproduction from a shipping product (CodeVibe,
@quantiya/codevibe-claude-pluginon npm).Our marketplace manifest is hosted on GitHub and pins plugin versions to npm packages via:
Most existing comments here describe the git-based marketplace variant. Our case is a hybrid: git-based manifest that pins npm-based plugin versions, and the bug manifests slightly differently. Reproduced on Claude Code 2.1.101 as of 2026-04-12.
Repro steps:
codevibe-claude1.0.5 installed. Filesystem state:~/.claude/plugins/cache/codevibe-marketplace/codevibe-claude/1.0.5/existsinstalled_plugins.jsonsays"version": "1.0.5","installPath": ".../1.0.5"marketplace.jsonto GitHub (bothversionandsource.versionbumped to1.0.10).claude plugin marketplace update codevibe-marketplace→ succeeds, cached manifest at~/.claude/plugins/marketplaces/codevibe-marketplace/.claude-plugin/marketplace.jsonnow correctly says1.0.10.claude plugin update codevibe-claude@codevibe-marketplace→ reports:``
`✔ codevibe-claude is already at the latest version (1.0.5).
package.jsonThis is factually wrong. The refreshed manifest the command just pulled says 1.0.10. The comparison is being made against the cached plugin's own
, not against the marketplace manifest'ssource.version`.claude plugin install codevibe-claude@codevibe-marketplace→ reports✔ Successfully installedwith exit 0. No files change on disk. Themtimeon the existing1.0.5/directory gets touched and that's it. No1.0.10/directory is ever created, no npm fetch happens.claude plugin uninstall codevibe-claude@codevibe-marketplace→ removes the entry frominstalled_plugins.json, but leaves the1.0.5/directory on disk. A subsequentinstallpicks it right back up.The only workaround that works:
This creates a fresh
1.0.10/cache directory and updatesinstalled_plugins.jsoncorrectly. All other paths fail silently.Impact on us as a plugin author: we had to ship a workaround in our own update script (
codevibe update) that:installed_plugins.jsonto get the currently-installed versionmarketplace.jsonto get the expected versionrm -rfs the three stale cache paths above and callsclaude plugin installinstalled_plugins.jsonmatches the expected version; fails loudly if notThis is ~100 lines of bash that Anthropic's plugin loader should be handling. Without it, customers silently stay on old versions for weeks or months — we saw one customer running a plugin 4 versions behind despite having run
codevibe updatemultiple times. In our case they missed a bug fix for a user-visible mobile sync issue, which shipped weeks earlier to npm but never made it to their cache.Suggested fix direction (for whoever picks this up): at install time, compare the
source.versionin the refreshed marketplace manifest against the plugin's ownpackage.jsonversion in the cache directory. If they differ, treat the cache as invalid and force a fresh fetch. At uninstall time, physically remove the cache directory (not just theinstalled_plugins.jsonentry). At update time, consult the marketplace manifest as the authoritative "latest version" source, not the cached plugin's ownpackage.json.Happy to share the cache-healing bash implementation if it's useful for anyone else hitting this until the upstream fix lands.
This is really a important feature that claude code should update.
This is really a important feature that claude code should update.
Confirming this with a repro where the stale cache doesn't just serve old behavior — it makes a component hard-fail to load, which is nastier to diagnose than silent staleness.
Setup: a git-marketplace plugin shipped a fix that removed a malformed line from an agent's frontmatter (a
tools:field whose value tokenized into unrecognized tool names, causing the agent to resolve to zero tools). The fix is correct — at repo HEAD the line is gone, and the new version is published.What the user saw after updating:
.mdunder~/.claude/plugins/cache/still contained the old, malformed frontmatter.Agent '…' would be spawned with zero tools — refusing.The agent picker even rendered the broken, tokenized tool list, proving the on-disk cached file was the pre-fix copy./reload-pluginsdid not help — consistent with the reports here that it only re-reads already-cached files, not the remote.So the
version-advances-but-content-stays-stalegap isn't only a "you keep running old code" problem — when an update is specifically meant to fix a load-blocking defect, the stale cache keeps the defect in place and the component is unusable until a manualrm -rf ~/.claude/plugins/cache/+ restart. The user reasonably concluded "the latest version didn't fix the bug," when in fact the fix never reached disk.Two things would each address this:
/plugin update(and auto-update) invalidating the cache + updating the stored commit SHA, as this issue asks.Claude Code 2.x, git-backed marketplace, macOS.