[BUG] marketplace add silently overwrites existing marketplace when two repos declare the same marketplace name
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When two repos from the same organization declare the same "name" in their .claude-plugin/marketplace.json, running claude plugin marketplace add for the second repo silently overwrites the first repo's registration in known_marketplaces.json. No warning is shown. The first repo's plugins silently break.
This is the natural and expected setup for organizations publishing multiple plugins under one brand -- both repos declare the same marketplace name because they belong to the same organization. There is nothing in the docs or CLI output warning that this will destroy the first registration.
Real-world impact: We publish two plugins under one organization:
session-loggerin repoDazzleML/claude-session-loggerclaude-session-backupin repoDazzleML/Claude-Session-Backup
Both declared "name": "dazzle-claude-plugins" in their marketplace.json. Adding the second repo silently overwrote the first. The session-logger plugin was broken for a week before we noticed. It only surfaced when we ran claude plugin list and saw Status: failed to load.
What Should Happen?
At minimum: marketplace add should warn the user when it's about to overwrite an existing marketplace registration from a different source.
Ideally: multiple repos should be able to contribute plugins to the same marketplace namespace. When an organization has repos org/plugin-a and org/plugin-b, both declaring "name": "org-plugins", a user should be able to add both and install plugin-a@org-plugins and plugin-b@org-plugins without collision.
Error Messages/Logs
No error is shown during the overwrite. The damage only appears later:
$ claude plugin list
> session-logger@dazzle-claude-plugins
Version: 0.1.5
Status: X failed to load
Error: Plugin session-logger not found in marketplace dazzle-claude-plugins
The marketplace name still exists, but it now points to the second repo which doesn't contain the first plugin.
Steps to Reproduce
- Create two repos, each with
.claude-plugin/marketplace.jsondeclaring the same"name":
Repo A (org/plugin-a):
``json``
{ "name": "org-plugins", "plugins": [{ "name": "plugin-a", "source": "./" }] }
Repo B (org/plugin-b):
``json``
{ "name": "org-plugins", "plugins": [{ "name": "plugin-b", "source": "./" }] }
- Add repo A and install plugin-a:
``bash``
claude plugin marketplace add "org/plugin-a"
claude plugin install plugin-a@org-plugins # Works
- Add repo B:
``bash``
claude plugin marketplace add "org/plugin-b" # No warning -- silently overwrites
- Check plugin status:
``bash``
claude plugin list
# plugin-a@org-plugins: FAILED TO LOAD
# plugin-b@org-plugins: enabled
- Observe: No warning was shown at step 3. The user had no way to know that adding repo B would break plugin-a.
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.146 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
This is copied verbatim from #44042 because the bot closed the issue before it was ever even looked at, as seems to happen often...
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗