claude-code - 💡(How to fix) Fix Plugin 'Update now' fails when CWD differs from original install workspace [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#45324Fetched 2026-04-09 08:03:52
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×4closed ×1commented ×1

Error Message

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.

Fix Action

Workaround

Manually edit ~/.claude/plugins/installed_plugins.json and change projectPath to the directory you want to update from.

Code Example

Failed to update: Plugin "X" is not installed at scope project (/path/to/workspace-B)

---

"my-plugin@my-marketplace": [{
  "scope": "project",
  "projectPath": "/path/to/workspace-A",
  ...
}]
RAW_BUFFERClick to expand / collapse

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

  1. Define a custom marketplace with a local plugin source ("source": "./claude-plugin" in .claude-plugin/marketplace.json)
  2. Register the marketplace in global settings via extraKnownMarketplaces
  3. Open Claude Code in workspace A and install the plugin — installed_plugins.json records "projectPath": "/path/to/workspace-A"
  4. Open Claude Code in workspace B (where the marketplace source actually lives)
  5. 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 projectPath to 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 user scope 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)

extent analysis

TL;DR

Update the projectPath in ~/.claude/plugins/installed_plugins.json to match the directory containing the marketplace source or the desired workspace.

Guidance

  • Verify the projectPath in installed_plugins.json is set to the CWD at install time, which may not match the current workspace.
  • Check if the plugin is enabled in enabledPlugins for the current workspace, as this could be a factor in the update validation.
  • Consider manually editing installed_plugins.json to change projectPath to the desired directory as a temporary workaround.
  • To mitigate the issue, ensure the marketplace source directory is consistent across workspaces or consider enabling the plugin at the user scope in global settings.

Example

No code snippet is provided as the issue is related to configuration and validation logic.

Notes

The suggested fix involves changing the projectPath or updating the validation logic, but the exact implementation details are not provided. The workaround of manually editing installed_plugins.json may not be scalable or desirable for all users.

Recommendation

Apply workaround: Manually edit ~/.claude/plugins/installed_plugins.json to update the projectPath to the desired directory, as this provides a temporary solution to the update issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING