Plugin update/uninstall fails when plugin is enabled but installed at different project scope
Bug Description
When a plugin is enabled in a project's .claude/settings.json but only has an installation record in installed_plugins.json for a different project, the plugin loads and functions correctly (resolved from the shared cache), but lifecycle operations like "Update now" and "Uninstall" fail with:
Failed to update: Plugin "claude-docs" is not installed at scope project (/path/to/other-project)
Steps to Reproduce
- Install a plugin (e.g.,
claude-docs@pback34-plugins) at project scope for Project A - In Project B's
.claude/settings.json, add the plugin toenabledPlugins:
``json``
{
"enabledPlugins": {
"claude-docs@pback34-plugins": true
}
}
- Open Claude Code in Project B — the plugin loads and works (skills, commands, hooks all function)
- Run
/plugin→ select the plugin → "Update now" - Error:
Failed to update: Plugin "claude-docs" is not installed at scope project
Expected Behavior
Either:
- Option A: Enabling a plugin should require/create an installation record for the current project (fail fast or auto-register)
- Option B: Update/uninstall should work by resolving the plugin from cache regardless of which project originally installed it
Actual Behavior
The plugin enters a half-installed state: it loads and functions from the shared cache, but update and uninstall operations fail because they look up installation records by project path, which doesn't exist for the current project.
Root Cause
installed_plugins.json entries are scoped by projectPath. The plugin loader resolves plugins from cache using the enabledPlugins config, but lifecycle operations (update, uninstall) query installed_plugins.json filtered by the current project path — finding no match.
Workaround
Manually add an installation entry in ~/.claude/plugins/installed_plugins.json for the affected project, copying the installPath, version, and gitCommitSha from the existing entry.
Environment
- Claude Code CLI
- Linux (Ubuntu-based)
- Plugins from third-party marketplace (
pback34-plugins)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗