[BUG] installed_plugins.json not updated when project marketplace plugin version chnages
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 a plugin installed from a project-local marketplace (.claude/marketplaces/) has its version bumped in the project source (e.g., updating version in .claude-plugin/plugin.json from 1.1.1 to 1.1.2), the next Claude Code session correctly:
- Detects the version change in the project marketplace source
- Creates a new versioned directory in the plugin cache (
~/.claude/plugins/cache/<marketplace>/<plugin>/<new-version>/) - Loads the new version into the session (skills show the updated version)
However, ~/.claude/plugins/installed_plugins.json is not updated — it continues to show the old version.
What Should Happen?
Expected behavior
installed_plugins.json should reflect the currently loaded/cached version after a marketplace plugin version change is detected at startup.
Actual behavior
installed_plugins.json retains the version from the original /plugin install and is never updated by the startup marketplace-sync flow.
Error Messages/Logs
Steps to Reproduce
- Install a plugin from a project-local marketplace via
/plugin install - Confirm
installed_plugins.jsonshows the correct version (e.g.,1.1.1) - Update the plugin's version in the project marketplace source (
.claude-plugin/plugin.jsonto1.1.2) - Start a new Claude Code session in the same project
- Observe: cache has new
1.1.2/directory, session loads 1.1.2, butinstalled_plugins.jsonstill shows1.1.1
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.81
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
Xterm
Additional Information
Root cause (from source analysis)
The plugin system has two separate code paths:
- Explicit install (
/plugin install): Calls the registry update functions that write toinstalled_plugins.json - Marketplace startup loading: Syncs files to cache and loads plugins, but does not call the registry update functions
The initialization migration function (zyA) that syncs installed_plugins.json with settings.json also doesn't help — when a plugin already exists in the registry, it only checks/updates scope and projectPath, never comparing or updating the version field.
Impact
installed_plugins.jsonbecomes stale and unreliable as a source of truth for installed plugin versions- Any tooling or diagnostics relying on
installed_plugins.jsonfor version info will report incorrect versions - Multiple stale cache directories accumulate (old versions are not cleaned up since the registry doesn't know about the new version)
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗