[BUG] `claude plugin install --scope project` overwrites `installed_plugins.json` instead of merging
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?
Each call to claude plugin install <plugin> --scope project overwrites ~/.claude/plugins/installed_plugins.json with a fresh single-entry file, erasing all previously registered plugins. After installing N plugins sequentially, only the last one survives in the registry.
The Plugins UI Errors tab then reports every project-scoped plugin as _"enabled in project settings but isn't installed here"_. Attempting to fix this by re-running claude plugin install for each missing plugin makes it worse — each fix wipes the entries installed before it.
What Should Happen?
claude plugin install should read the existing installed_plugins.json, merge the new plugin entry into the existing "plugins" object, and write the result back. All previously installed plugins should remain registered after installing a new one.
Error Messages/Logs
No explicit error is shown. The only observable signals are:
- The Plugins UI Errors tab shows N errors (one per project-scoped plugin, except the last-installed)
- Each error reads: `Plugin "X" is enabled in project settings but isn't installed here`
- Running `claude plugin install X --scope project` reports `✔ Successfully installed` but silently removes all other entries from the registry
Steps to Reproduce
- Install two or more plugins at project scope sequentially:
````
claude plugin install plugin-a@marketplace --scope project
claude plugin install plugin-b@marketplace --scope project
- Inspect
~/.claude/plugins/installed_plugins.json - Observe that only
plugin-bis present —plugin-a's entry has been overwritten
Additional context: Discovered after brew upgrade claude to 2.1.195. Plugins installed before the upgrade were correctly present in installed_plugins.json. The overwrite behavior began with the first claude plugin install run after the upgrade.
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.195 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
The plugin cache files under ~/.claude/plugins/cache/ are not affected — all plugin content is correctly downloaded. Only the installation registry (installed_plugins.json) is corrupted by the overwrite.
Workaround: Manually reconstruct ~/.claude/plugins/installed_plugins.json by merging all entries:
{
"version": 2,
"plugins": {
"plugin-a@marketplace": [
{
"scope": "project",
"installPath": "~/.claude/plugins/cache/marketplace/plugin-a/<version>",
"version": "<version>",
"installedAt": "<timestamp>",
"lastUpdated": "<timestamp>",
"gitCommitSha": "<sha>",
"projectPath": "/path/to/project"
}
],
"plugin-b@marketplace": [ "..." ]
}
}
Note: The direct consequence of this is installing skills only to see the older skills with errors, next. Trying to follow the instruction to reinstall the plugins via cli does not work, since installing one uninstall the others.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗