Plugin marketplace add doesn't register in known_marketplaces.json

Resolved 💬 2 comments Opened Apr 22, 2026 by SugeethK Closed Apr 22, 2026

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

  1. Create a private GitHub repo with a valid marketplace structure (.claude-plugin/marketplace.json listing plugins, each plugin having its own .claude-plugin/plugin.json)
  2. Run /plugin marketplace add myorg/my-plugins
  • Output: Successfully added marketplace: my-marketplace
  1. 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.jsonextraKnownMarketplaces) and the actual source of truth for discovery (known_marketplaces.json) are out of sync.

| Layer | File | Has entry? | Documented? |
|---|---|---|---|
| Settings | ~/.claude/settings.jsonextraKnownMarketplaces | ✅ 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:

  1. Plugin discovery should read from extraKnownMarketplaces in settings.json as the docs describe, or
  2. /plugin marketplace add should also populate known_marketplaces.json so 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)

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗