[BUG] allowCrossMarketplaceDependenciesOn / dependency marketplace field ignored for npm-sourced plugins (terminal CLI)
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?
Following the documented steps in plugin-dependencies.md#depend-on-a-plugin-from-another-marketplace exactly, using the
object-form dependency { "name": "...", "marketplace": "..." } and setting allowCrossMarketplaceDependenciesOn on the root
marketplace, the dependency resolver never consults the marketplace field. It always looks for
<dependency-name>@<declaring-plugin's-own-marketplace>, regardless of what marketplace is set to.
This happens even when:
- The target marketplace is confirmed present (/plugin marketplace list)
- The dependency plugin is confirmed installed and enabled under the target marketplace before retesting
- The error persists identically across all of the above
Reproduced with two npm-sourced marketplaces (devtest, devtest2) added via extraKnownMarketplaces in a project's
.claude/settings.local.json, both hosted on a private artifacts generic repo (not GitHub-backed).
What Should Happen?
Per the docs: "When you install a plugin that declares dependencies, Claude Code resolves and installs them automatically." Installing a plugin whose dependency entry specifies marketplace: "X" should resolve/check for that dependency under
marketplace X, not under the declaring plugin's own marketplace.
Error Messages/Logs
Dependency "devtest--dep-target@devtest" (required by devtest--mcp@devtest) not found. Is the "devtest" marketplace added?
Note it says @devtest (the declaring plugin's marketplace) even though the dependency entry declares "marketplace": "devtest2"
Steps to Reproduce
- Marketplace devtest2, one plugin devtest--dep-target (npm source).
- Marketplace devtest:
``` {
"name": "devtest",
"allowCrossMarketplaceDependenciesOn": ["devtest2"],
"plugins": [
{
"name": "devtest--mcp",
"source": { "source": "npm", "package": "...", "registry": "..." },
"dependencies": [{ "name": "devtest--dep-target", "marketplace": "devtest2" }]
}
]
}
3. Add both marketplaces, confirm both appear in /plugin marketplace list.
4. /plugin install devtest--dep-target@devtest2 (satisfy the dependency manually first), confirm it shows enabled in /plugin.
5. /plugin install devtest--mcp@devtest, /reload-plugins.
6. Error persists exactly as above, despite the dependency existing, being enabled, and being under the exact marketplace named
in the marketplace field.
- Install method: terminal CLI, marketplaces added via extraKnownMarketplaces (source: "url", custom Artifactory host)
### Claude Model
Sonnet (default)
### Is this a regression?
I don't know
### Last Working Version
_No response_
### Claude Code Version
2.1.220
### Platform
AWS Bedrock
### Operating System
macOS
### Terminal/Shell
Other
### Additional Information
Untested variable: the docs' own worked example uses a relative-path plugin source ("./deploy-kit"), not npm. It's possible
this is specific to npm-sourced plugins rather than a universal resolver bug, since npm/archive sources are separately
documented as skipping the git-tag machinery used for dependency version resolution. Haven't been able to test against a
git-backed marketplace to isolate that variable.This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗