Plugin 'Update now' fails when CWD differs from original install workspace
Bug
When a project-scoped plugin is installed from a local marketplace source, ~/.claude/plugins/installed_plugins.json records projectPath as the CWD at install time. The "Update now" action validates the current CWD against this stored projectPath, failing from any other workspace — even the workspace that contains the marketplace source.
Steps to reproduce
- Define a custom marketplace with a local plugin source (
"source": "./claude-plugin"in.claude-plugin/marketplace.json) - Register the marketplace in global settings via
extraKnownMarketplaces - Open Claude Code in workspace A and install the plugin —
installed_plugins.jsonrecords"projectPath": "/path/to/workspace-A" - Open Claude Code in workspace B (where the marketplace source actually lives)
- Navigate to Plugins > [plugin] > "Update now"
Expected
Update succeeds — the plugin is enabled and the source is resolvable.
Actual
Failed to update: Plugin "X" is not installed at scope project (/path/to/workspace-B)
The error names the current CWD, not the registered projectPath. The update fails because CWD ≠ stored projectPath.
Root cause
In installed_plugins.json, the projectPath field for project-scoped plugins is set to the CWD at install time:
"my-plugin@my-marketplace": [{
"scope": "project",
"projectPath": "/path/to/workspace-A",
...
}]
The "Update now" validation checks projectPath against the current CWD and rejects the update if they differ.
Suggested fix
One or more of:
- Set
projectPathto the directory containing the marketplace source (.claude-plugin/marketplace.json), not the CWD at install time - Allow "Update now" from any workspace where the plugin is enabled in
enabledPlugins - If the plugin is also enabled at
userscope in global settings, allow the update regardless of CWD
Workaround
Manually edit ~/.claude/plugins/installed_plugins.json and change projectPath to the directory you want to update from.
Environment
- Claude Code v2.1.96
- macOS (Darwin 25.3.0)
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗