claude-code - 💡(How to fix) Fix `plugin install` fails on stale marketplace clone — no auto-refresh and no recovery hint in error [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#54678Fetched 2026-04-30 06:39:02
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1

claude plugin install <name>@<marketplace> does not refresh the local marketplace clone before resolving the plugin name. When the local clone is older than the marketplace's current marketplace.json, install fails with Plugin not found in marketplace '<name>' — even though the plugin is genuinely listed in the public manifest. The error gives no recovery hint, sending users down manual-installation paths instead of the one-line fix.

Error Message

claude plugin install <name>@<marketplace> does not refresh the local marketplace clone before resolving the plugin name. When the local clone is older than the marketplace's current marketplace.json, install fails with Plugin not found in marketplace '<name>' — even though the plugin is genuinely listed in the public manifest. The error gives no recovery hint, sending users down manual-installation paths instead of the one-line fix. Bug 2 — the error message is a dead end. `Plugin not found in marketplace '<name>'` is accurate from the local clone's perspective but actively misleads. Users assume the plugin doesn't exist; plugin authors receive bug reports that aren't their plugin's fault. 3. At minimum, add the recovery hint to the error message. Smallest change with the biggest user-experience win.

Root Cause

claude plugin install <name>@<marketplace> does not refresh the local marketplace clone before resolving the plugin name. When the local clone is older than the marketplace's current marketplace.json, install fails with Plugin not found in marketplace '<name>' — even though the plugin is genuinely listed in the public manifest. The error gives no recovery hint, sending users down manual-installation paths instead of the one-line fix.

Fix Action

Fix / Workaround

  1. Workaround:
RAW_BUFFERClick to expand / collapse

Summary

claude plugin install <name>@<marketplace> does not refresh the local marketplace clone before resolving the plugin name. When the local clone is older than the marketplace's current marketplace.json, install fails with Plugin not found in marketplace '<name>' — even though the plugin is genuinely listed in the public manifest. The error gives no recovery hint, sending users down manual-installation paths instead of the one-line fix.

Environment

  • Claude Code: 2.1.123
  • Platform: macOS (darwin 25.4.0)
  • Marketplace type: git-source marketplace (cloned to `~/.claude/plugins/marketplaces/<name>/`)

Reproduction

  1. Add a new plugin entry to a marketplace's `marketplace.json` and push to the remote.

  2. On a separate machine where the marketplace was cloned before step 1:

    ```bash claude plugin install <new-plugin>@<marketplace>

    → Plugin not found in marketplace '<marketplace>'

    ```

  3. Workaround:

    ```bash claude plugin marketplace update <marketplace> claude plugin install <new-plugin>@<marketplace> # succeeds ```

The same staleness issue affects `claude plugin update <name>@<marketplace>`: the target version is resolved against the local clone, so a marketplace that bumped a plugin's version after the user's last refresh effectively serves stale versions.

Two distinct bugs

Bug 1 — `install`/`update` don't refresh the clone. Neither command runs `git pull` (or otherwise re-fetches the manifest) before resolving plugin names or versions. The `autoUpdate` flag in `known_marketplaces.json` is per-marketplace and may be `false`; even when `true`, it is unclear whether it fires before resolution or only on a separate cadence.

Bug 2 — the error message is a dead end. `Plugin not found in marketplace '<name>'` is accurate from the local clone's perspective but actively misleads. Users assume the plugin doesn't exist; plugin authors receive bug reports that aren't their plugin's fault.

A recovery hint closes the loop:

``` Plugin not found in marketplace 'xiaolai'. Try: claude plugin marketplace update xiaolai (your local marketplace clone may be out of date) ```

Suggested fixes (in order of leverage)

  1. Auto-refresh on resolution failure. If a plugin name doesn't resolve, attempt one `git pull` of the marketplace and retry before erroring. Cheap, robust, no flag required.
  2. Honor `autoUpdate: true` before every install. Make the contract explicit: the local clone is refreshed before any install/update operation against that marketplace.
  3. At minimum, add the recovery hint to the error message. Smallest change with the biggest user-experience win.

Real-world impact

A third-party user reported install failures for a plugin that had been listed in the marketplace for days. Both `plugin.json` and `marketplace.json` were correct; the local clone was simply stale. Diagnosis took significant time. The pattern affects every git-source marketplace, not a specific one.

extent analysis

TL;DR

The most likely fix is to auto-refresh the local marketplace clone before resolving plugin names or versions, either by attempting a git pull on resolution failure or honoring the autoUpdate: true flag before every install/update operation.

Guidance

  • To verify the issue, try updating the local marketplace clone using claude plugin marketplace update <marketplace> and then attempt the install again.
  • Consider adding a recovery hint to the error message to guide users towards updating their local clone.
  • If possible, implement an auto-refresh mechanism, such as attempting a git pull on resolution failure, to ensure the local clone is up-to-date before resolving plugin names or versions.
  • Review the autoUpdate flag in known_marketplaces.json to ensure it is set to true for the affected marketplace and that it is being honored before every install/update operation.

Example

No code snippet is provided as the issue is more related to the behavior of the claude plugin and its interaction with the marketplace.

Notes

The suggested fixes are in order of leverage, with the first option (auto-refresh on resolution failure) being the most robust and the third option (adding a recovery hint to the error message) being the smallest change with the biggest user-experience win.

Recommendation

Apply the workaround by adding a recovery hint to the error message, as it is the smallest change with the biggest user-experience win, and consider implementing an auto-refresh mechanism in the long term to prevent similar issues.

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

claude-code - 💡(How to fix) Fix `plugin install` fails on stale marketplace clone — no auto-refresh and no recovery hint in error [1 comments, 2 participants]