[BUG] plugin update command downgrades to oldest cached version instead of latest
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 running claude plugin update <plugin>@<marketplace>, the command selects the
oldest cached version instead of the latest available version from the marketplace.
Expected Behavior
Plugin should update to version 1.3.0 (the latest in the marketplace)
Actual Behavior
Plugin "updates" from 1.3.0 to 1.0.0 (the oldest cached version):
✔ Plugin "notion-reader" updated from 1.3.0 to 1.0.0 for scope user.
Root Cause
The installed_plugins.json file points to the old version path. The update
command seems to re-download all versions but then selects the wrong one
(oldest instead of newest) when updating the installed_plugins.json.
Cache shows multiple versions exist:
~/.claude/plugins/cache/health-force-marketplace/notion-reader/1.0.0
~/.claude/plugins/cache/health-force-marketplace/notion-reader/1.1.0
~/.claude/plugins/cache/health-force-marketplace/notion-reader/1.3.0
But installed_plugins.json incorrectly points to 1.0.0 after update.
Workaround
Manually edit ~/.claude/plugins/installed_plugins.json to point to the correct
version path and version number.
What Should Happen?
The plugin update command should update the plugin to the latest version available
in the marketplace (1.3.0), not downgrade to an older cached version (1.0.0).
Expected behavior:
- Command fetches latest version from marketplace repository
- Compares versions using semantic versioning
- Updates installed_plugins.json to point to the highest version
- Output should show: "Plugin updated from X.X.X to 1.3.0" (higher version)
Actual behavior:
- Command outputs: "Plugin updated from 1.3.0 to 1.0.0" (downgrade)
- installed_plugins.json points to oldest cached version instead of latest
Error Messages/Logs
Steps to Reproduce
- Install a plugin from a marketplace:
claude plugin install notion-reader@health-force-marketplace - Push an updated version (e.g., 1.3.0) to the marketplace repository
- Run
claude plugin update notion-reader@health-force-marketplace
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.76
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗