claude-code - 💡(How to fix) Fix Plugin registry not updated after local plugin version bump [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#45379Fetched 2026-04-09 08:06:48
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×4commented ×1subscribed ×1

Fix Action

Workaround

Manually update installPath and version in ~/.claude/plugins/installed_plugins.json, or re-run claude plugin add for each affected project.

Code Example

{
  "installPath": "~/.claude/plugins/cache/my-org/my-plugin/2.2.8",
  "version": "2.2.8"
}
RAW_BUFFERClick to expand / collapse

Bug

When a locally-installed plugin's version is bumped (e.g., via a pre-commit hook that auto-increments plugin.json version), the new version is cached correctly under ~/.claude/plugins/cache/<org>/<plugin>/<new-version>/, but installed_plugins.json retains the old installPath and version entries.

This causes CLAUDE_PLUGIN_ROOT to resolve to the stale cache directory in subsequent sessions, so:

  • Skills/commands reference old plugin files (missing new migrations, engines, etc.)
  • get_plugin_version() returns the old version
  • Session hooks don't detect version changes or pending migrations

Reproduction

  1. Install a local plugin: claude plugin add ./my-plugin (e.g., v2.2.8)
  2. Make changes and commit — pre-commit hook bumps plugin.json to v2.2.11
  3. The cache at ~/.claude/plugins/cache/<org>/<plugin>/2.2.11/ is created
  4. Start a new Claude Code session in a project using this plugin
  5. Run a command that references ${CLAUDE_PLUGIN_ROOT} — it resolves to the v2.2.8 cache path

Expected

installed_plugins.json should update installPath and version to point to the latest cached version when a new version is detected, or at session start.

Actual

installed_plugins.json keeps the old entries:

{
  "installPath": "~/.claude/plugins/cache/my-org/my-plugin/2.2.8",
  "version": "2.2.8"
}

Even though ~/.claude/plugins/cache/my-org/my-plugin/2.2.11/ exists with the correct plugin.json.

Workaround

Manually update installPath and version in ~/.claude/plugins/installed_plugins.json, or re-run claude plugin add for each affected project.

Environment

  • Claude Code CLI
  • Linux (Debian 13)
  • Local plugins installed via claude plugin add ./path

extent analysis

TL;DR

Update installed_plugins.json to reflect the latest plugin version by manually changing the installPath and version entries or re-running claude plugin add for each affected project.

Guidance

  • Verify the cache directory structure under ~/.claude/plugins/cache/<org>/<plugin>/ to ensure the new version is correctly cached.
  • Check the plugin.json file in the new version's cache directory to confirm it matches the expected version.
  • Consider implementing a script to automatically update installed_plugins.json when a plugin version is bumped, to prevent manual intervention.
  • Before running a command that references ${CLAUDE_PLUGIN_ROOT}, ensure the installed_plugins.json file has been updated to point to the latest cached version.

Example

No code snippet is provided as the issue does not require a code-level fix, but rather a configuration update.

Notes

This workaround assumes that the pre-commit hook correctly updates the plugin.json version and that the cache directory is properly updated. If issues persist, further investigation into the caching mechanism and plugin version detection may be necessary.

Recommendation

Apply workaround: Manually update installed_plugins.json or re-run claude plugin add for each affected project, as this directly addresses the issue of stale cache references.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING