Plugin marketplace add doesn't register in known_marketplaces.json
Bug
/plugin marketplace add <owner/repo> successfully clones the marketplace repo and registers it in ~/.claude/settings.json under extraKnownMarketplaces, but subsequent /plugin install <plugin>@<marketplace> fails with "Plugin not found in any marketplace".
Steps to Reproduce
- Create a private GitHub repo with a valid marketplace structure (
.claude-plugin/marketplace.jsonlisting plugins, each plugin having its own.claude-plugin/plugin.json) - Run
/plugin marketplace add myorg/my-plugins
- Output:
Successfully added marketplace: my-marketplace
- Run
/plugin install my-plugin@my-marketplace
- Output:
Plugin "my-plugin" not found in any marketplace
Expected Behavior
After a successful marketplace add, the marketplace should be discoverable immediately — /plugin install should find plugins listed in that marketplace's manifest.
Actual Behavior
The marketplace is correctly registered in settings.json under extraKnownMarketplaces and cloned to ~/.claude/plugins/marketplaces/<name>/, but plugin discovery does not find it.
Root Cause
Per the plugin configuration docs, extraKnownMarketplaces in settings.json is the documented mechanism for marketplace registration and discovery. However, the plugin discovery code appears to read from an internal cache file (~/.claude/plugins/known_marketplaces.json) rather than — or in addition to — extraKnownMarketplaces in settings.json.
The built-in marketplaces (claude-plugins-official, claude-code-warp) work because they are seeded into this internal cache at install time. Third-party marketplaces added via /plugin marketplace add correctly write to the documented config (settings.json) but are never picked up because discovery doesn't read from it.
In short: the documented source of truth (settings.json → extraKnownMarketplaces) and the actual source of truth for discovery (known_marketplaces.json) are out of sync.
| Layer | File | Has entry? | Documented? |
|---|---|---|---|
| Settings | ~/.claude/settings.json → extraKnownMarketplaces | ✅ Yes | ✅ Yes |
| On disk | ~/.claude/plugins/marketplaces/<name>/ (cloned, valid manifest) | ✅ Yes | — |
| Internal cache | ~/.claude/plugins/known_marketplaces.json | ❌ No | ❌ Not in docs |
Workaround
Manually add the missing entry to ~/.claude/plugins/known_marketplaces.json:
"my-marketplace": {
"source": {
"source": "github",
"repo": "myorg/my-plugins"
},
"installLocation": "/Users/<user>/.claude/plugins/marketplaces/my-marketplace",
"lastUpdated": "2026-04-22T00:00:00.000Z"
}
After that, /plugin install my-plugin@my-marketplace succeeds.
Suggested Fix
Either:
- Plugin discovery should read from
extraKnownMarketplacesinsettings.jsonas the docs describe, or /plugin marketplace addshould also populateknown_marketplaces.jsonso the internal cache stays in sync with the documented config.
Option 1 is more correct — it makes the code match the documentation.
Note
Reproduced with a private GitHub repository. Marketplace manifest and plugin definitions were valid — confirmed by the plugin installing successfully after the manual workaround.
Environment
- Claude Code CLI (latest as of 2026-04-21)
- macOS (Darwin 25.4.0)
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗