Plugin marketplace: /plugin & /reload-plugins wipe marketplace dir and fail to re-clone (owner-prefixed path mismatch with CLI) → all plugins + MCP servers fail to load
Summary
The in-app plugin loader (/plugin, /reload-plugins, and startup) and the CLI (claude plugin marketplace …) disagree on the marketplace install path. The in-app loader empties the marketplace directory and then fails to re-clone, leaving 0 plugins · 21 errors and taking down every plugin — including plugin-provided MCP servers (e.g. sentry, supabase, posthog). The CLI can repopulate it, but the very next /plugin or /reload-plugins wipes it again, so there is no way to recover from the UI.
Environment
- Claude Code
2.1.195 - macOS (darwin 25.5.0)
- Marketplace:
claude-plugins-official(anthropics/claude-plugins-official), 21 plugins installed
What happens
known_marketplaces.json records:
"installLocation": "/Users/<me>/.claude/plugins/marketplaces/claude-plugins-official"
i.e. the CLI installs to marketplaces/<repo> = claude-plugins-official.
But the in-app loader tries to clone to the owner-prefixed path marketplaces/anthropics-claude-plugins-official, and fails:
Failed to load all marketplaces. Errors: claude-plugins-official: Failed to load marketplace
"claude-plugins-official" from source (github): Failed to clone marketplace repository:
Cloning into '/Users/<me>/.claude/plugins/marketplaces/anthropics-claude-plugins-official'...
fatal: Invalid path '/Users/<me>/.claude/plugins/marketplaces/anthropics-claude-plugins-official': No such file or directory
/reload-plugins then reports:
Reloaded: 0 plugins · 0 skills · 25 agents · 0 hooks · 0 plugin MCP servers · 0 plugin LSP servers
21 errors during load. Run /doctor for details.
and /doctor lists all 21 plugins as Marketplace claude-plugins-official failed to load: cache-miss.
Most importantly: after each /plugin or /reload-plugins, ~/.claude/plugins/marketplaces/claude-plugins-official/ is left empty (the loader appears to clear the directory before the clone, and the clone fails, so nothing is restored).
Workaround (partial)
From a shell:
claude plugin marketplace update claude-plugins-official
re-clones successfully into marketplaces/claude-plugins-official and claude plugin list shows all plugins enabled. But the next time /plugin or /reload-plugins runs (including, presumably, at the next session start), the in-app loader empties the dir again and the plugins/MCP servers disappear. Adding a symlink anthropics-claude-plugins-official -> claude-plugins-official did not help — the loader still wiped the real dir.
The plugin caches under ~/.claude/plugins/cache/claude-plugins-official/<plugin>/<version>/ remain intact throughout; only the marketplaces/ checkout is destroyed.
Steps to reproduce
- Have
claude-plugins-officialinstalled via CLI (populatesmarketplaces/claude-plugins-official). - Run
/reload-plugins(or open/plugin). - Observe
0 plugins · 21 errors, and thatmarketplaces/claude-plugins-official/is now empty. - Run
claude plugin marketplace update claude-plugins-official— repopulates, CLI sees plugins again. - Run
/reload-pluginsagain — wiped again. Loop.
Suggested fixes
- Reconcile the two path conventions. The in-app loader should read
installLocationfromknown_marketplaces.jsonrather than deriving an<owner>-<repo>path that the CLI never writes. - Never destroy the existing checkout before a successful clone/pull. Clone to a temp dir and swap on success, so a failed clone can't leave the marketplace empty and brick every plugin.
- Investigate the
fatal: Invalid path … No such file or directoryclone failure (looks like the parent path/target isn't created beforegit clone).
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗