Plugin re-installation sets version to 'unknown' in installed_plugins.json
Description
When re-installing a plugin that has already been installed in project scope, the claude plugin install command records "version": "unknown" in ~/.claude/plugins/installed_plugins.json instead of the actual version.
Steps to Reproduce
- Install a plugin at project scope:
``bash``
cd /path/to/project
claude plugin install github@claude-plugins-official --scope project
- Re-install the same plugin (either via TUI or CLI):
``bash``
claude plugin install github@claude-plugins-official --scope project
- Check
~/.claude/plugins/installed_plugins.json
Expected Behavior
The plugin entry should have the correct version (e.g., "f1be96f0fb58" or semantic version like "1.0.0"):
{
"scope": "project",
"projectPath": "/path/to/project",
"installPath": "/Users/.../.claude/plugins/cache/claude-plugins-official/github/f1be96f0fb58",
"version": "f1be96f0fb58",
...
}
Actual Behavior
The plugin entry has "version": "unknown" and the install path also contains unknown:
{
"scope": "project",
"projectPath": "/path/to/project",
"installPath": "/Users/.../.claude/plugins/cache/claude-plugins-official/github/unknown",
"version": "unknown",
...
}
Additional Observations
- First installation works correctly - Version information is properly recorded on the initial install
- TUI cannot re-install - The TUI does not allow re-installation of an already installed plugin (it shows as already installed)
- User scope also affected - Re-installing at user scope has the same issue
- Workaround exists - Running
claude plugin update <plugin-name>corrects the version:
``bash``
claude plugin update github@claude-plugins-official
# ✔ Plugin "github" updated from unknown to f1be96f0fb58 for scope user
Environment
- Claude Code version: 2.1.2
- OS: macOS (Darwin 25.2.0)
Impact
- Version tracking becomes unreliable after re-installation
- Users may have inconsistent plugin states across projects
- The install path containing
unknownmay cause issues with cache management
Suggested Fix
The re-installation flow should retrieve the version information from the marketplace metadata before writing to installed_plugins.json, similar to how the initial installation process works.
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗