Plugin registry not updated after local plugin version bump
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
- Install a local plugin:
claude plugin add ./my-plugin(e.g., v2.2.8) - Make changes and commit — pre-commit hook bumps
plugin.jsonto v2.2.11 - The cache at
~/.claude/plugins/cache/<org>/<plugin>/2.2.11/is created - Start a new Claude Code session in a project using this plugin
- 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
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗