[BUG] A local `directory` type `extraKnownMarketplaces` is not automatically added
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?
We have the following setup in .claude/settings.json in a repository:
"extraKnownMarketplaces": {
"internal-marketplace": {
"source": {
"source": "directory",
"path": "./.claude"
}
}
}
When I start up claude in this repository, I expect internal-marketplace to be automatically added to /plugin > Marketplaces.
However it's not showing up there.
Running this from the terminal works, the marketplace is set up correctly in .claude/.claude-plugin/marketplace.json:
claude plugin marketplace add ./.claude
What Should Happen?
The local directory marketplace should be automatically added to /plugin > Marketplaces.
Error Messages/Logs
Steps to Reproduce
- Add a single
directorymarketplace toextraKnownMarketplaces(nogithubor other markeplaces) - Run
claude. - Run
/pluginand go toMarketplacestab. - The local marketplace is not there.
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.6
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Warp
Additional Information
During troubleshooting I can see that internal-marketplace shows up for a brief moment in my ~/.claude/plugins/known_marketplaces.json and then instantly disappears, when I start up claude. I can also "fix" it if I add any github marketplace.
My guess is there is some parallel process on startup that updates known_marketplaces.json and for some reason erases the directory marketplace. Adding github marketplace adds enough fetching delay so that known_marketplaces.json is updated after that other parallel process.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗