Plugin cache: CLAUDE_PLUGIN_ROOT points to stale version after plugin update
Resolved 💬 5 comments Opened Dec 29, 2025 by Zate Closed Feb 28, 2026
Description
When a plugin version is updated, new Claude Code sessions may still use the old cached version's scripts. The CLAUDE_PLUGIN_ROOT environment variable appears to resolve to a stale cache directory despite installed_plugins.json showing the correct updated version.
Steps to Reproduce
- Install a plugin from a local directory marketplace (e.g.,
devloopfromcc-plugins) - Make changes to the plugin and bump the version (e.g., from 2.4.4 to 2.4.7)
- Commit and push the changes
- Start a new Claude Code session in a different project
- Invoke a plugin command that uses
${CLAUDE_PLUGIN_ROOT}in script paths
Expected Behavior
The new session should use scripts from the latest cached version (2.4.7):
/home/user/.claude/plugins/cache/cc-plugins/devloop/2.4.7/scripts/...
Actual Behavior
The new session uses scripts from an old cached version (2.4.4):
/home/user/.claude/plugins/cache/cc-plugins/devloop/2.4.4/scripts/...
Evidence
installed_plugins.json shows correct version:
{
"devloop@cc-plugins": [{
"scope": "user",
"installPath": "/home/user/.claude/plugins/cache/cc-plugins/devloop/2.4.7",
"version": "2.4.7",
"lastUpdated": "2025-12-28T10:57:20.745Z",
"gitCommitSha": "f42d089..." // <-- This SHA is from v1.0.0, 211 commits behind!
}]
}
Session log shows mixed version references:
- 1× reference to
devloop/2.4.4path - 6× references to
devloop/2.4.7path
Cache directory contains multiple versions:
~/.claude/plugins/cache/cc-plugins/devloop/
├── 2.4.4/ (Dec 27)
├── 2.4.5/ (Dec 27)
├── 2.4.6/ (Dec 28)
└── 2.4.7/ (Dec 28) <-- Should be used
Analysis
- The
versionfield ininstalled_plugins.jsonupdates correctly to 2.4.7 - The
installPathfield points to the correct 2.4.7 cache directory - However, the
gitCommitShais severely stale (points to v1.0.0, 211 commits behind) - When resolving
CLAUDE_PLUGIN_ROOT, something causes the old version's path to be used
Possible Root Causes
- Environment variable
CLAUDE_PLUGIN_ROOTis cached/inherited incorrectly - The stale
gitCommitShacauses incorrect cache lookup - Race condition when multiple sessions access the plugin cache
- Plugin resolution uses a different mechanism than
installed_plugins.json
Workaround
Manually delete old cache versions:
rm -rf ~/.claude/plugins/cache/cc-plugins/devloop/2.4.{0,1,2,3,4,5,6}
Environment
- Claude Code version: 2.0.76
- OS: Linux (WSL2)
- Plugin source: Local directory marketplace
- Plugin: devloop from cc-plugins
Impact
This causes plugin updates to be silently ignored, leading to:
- Users running outdated plugin scripts
- Confusion when fixes don't take effect
- Inconsistent behavior between sessions
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗