Plugin registry not updated after local plugin version bump

Resolved 💬 3 comments Opened Apr 8, 2026 by snashikkar Closed Apr 12, 2026

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

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗