[BUG] Plugin installPath incorrectly includes marketplace.json filename
Description
When configuring a custom marketplace using a relative file path to marketplace.json, Claude Code incorrectly constructs the plugin's installPath by concatenating the full marketplace file path (including the .json filename) with the plugin source path, resulting in an invalid path and need to manually clear out cache.
Expected Behavior
The installPath should use the marketplace directory as the base, not the marketplace file path.
Expected:
"installPath": "../../.claude-plugin/plugins/project-shared-skills"
Actual Behavior
The installPath incorrectly includes marketplace.json as if it were a directory.
Actual:
"installPath": "../../.claude-plugin/marketplace.json/plugins/project-shared-skills"
Impact
- Plugin shows as "Installed" in
/pluginUI - Plugin fails to load with error: "Plugin 'project-shared-skills' not found in marketplace 'project-plugins'"
- Skills, commands, and other plugin features are not available
- Zero plugin skills/commands/agents loaded despite successful marketplace installation
Reproduction Steps
- Create a custom marketplace structure:
project/
├── .claude-plugin/
│ ├── marketplace.json
│ └── plugins/
│ └── project-shared-skills/
│ ├── .claude-plugin/
│ │ └── plugin.json
│ └── skills/
│ └── playwright/
│ └── SKILL.md
└── apps/
└── example/
└── .claude/
└── settings.json
- Configure marketplace in
apps/example/.claude/settings.json:
{
"extraKnownMarketplaces": {
"project-plugins": {
"source": { "source": "file", "path": "../../.claude-plugin/marketplace.json" }
}
},
"enabledPlugins": {
"project-shared-skills@project-plugins": true
}
}
- Configure marketplace in
project/.claude-plugin/marketplace.json:
{
"name": "project-plugins",
"owner": { "name": "Project DevTools" },
"plugins": [
{
"name": "project-shared-skills",
"source": "./plugins/project-shared-skills",
"description": "Shared Skills for all project apps"
}
]
}
- Start Claude Code from
project/apps/example/directory
- Check
/plugin- marketplace shows as "Installed" but plugin fails to load
- Inspect
~/.claude/plugins/installed_plugins.json- observe malformedinstallPath
Environment
Claude Code Version
2.0.45
Platform
Google Vertex AI
Operating System
Other Linux
Terminal/Shell
Ghostty
Additional Context
- Working directory: Subdirectory of repository (e.g.,
project/apps/example/) - Marketplace path: Relative path to parent directories (e.g.,
../../.claude-plugin/marketplace.json)
Debug Log Evidence
From ~/.claude/debug/*.txt:
[DEBUG] Plugin loading errors: Plugin project-shared-skills not found in marketplace project-plugins
[DEBUG] Total plugin skills loaded: 0
[DEBUG] Total plugin commands loaded: 0
Root Cause Analysis
The plugin installation logic appears to concatenate:
- Marketplace source path:
../../.claude-plugin/marketplace.json - Plugin source path from marketplace:
./plugins/project-shared-skills
Resulting in: ../../.claude-plugin/marketplace.json/plugins/project-shared-skills
The logic should strip the filename from the marketplace path or use the marketplace's directory as the base.
Workarounds Attempted
- Using absolute paths (works but not portable across users/machines)
- Moving plugins directory to different locations
- Clearing cache files (
known_marketplaces.json,installed_plugins.json)
Related Issues
This affects any setup where:
- Custom marketplace is in a parent directory
- Working directory is a subdirectory of the project
- Relative paths are required for portability across team members
Suggested Fix
When constructing installPath, use path.dirname() on the marketplace file path before concatenating with the plugin source path, or recognize that marketplace paths ending in .json are files and should be treated as such.
6 Comments
I've reproduced and confirmed the bug. The issue occurs during the initial plugin installation when
marketplaces are first discovered from
extraKnownMarketplaces.### Evidence
When Claude Code discovers a marketplace from a relative file path and attempts to install plugins, it
constructs the
installPathby concatenating the marketplace file path (including the.jsonfilename) withthe plugin source path:
Broken
installed_plugins.json:``
json
``{
"version": 1,
"plugins": {
"project-shared-skills@project-plugins": {
"version": "unknown",
"installedAt": "2025-11-22T20:27:44.176Z",
"lastUpdated": "2025-11-22T20:27:44.176Z",
"installPath": "../../.claude-plugin/marketplace.json/plugins/project-shared-skills",
"isLocal": true
},
"custom-plugin@custom-marketplace": {
"version": "unknown",
"installedAt": "2025-11-22T20:27:44.176Z",
"lastUpdated": "2025-11-22T20:27:44.176Z",
"installPath": "../../../tools/claude/marketplace.json/plugins/custom-plugin",
"isLocal": true
}
}
}
Corresponding
known_marketplaces.json:``
json
``{
"project-plugins": {
"source": {
"source": "file",
"path": "../../.claude-plugin/marketplace.json"
},
"installLocation": "../../.claude-plugin/marketplace.json",
"lastUpdated": "2025-11-22T20:27:44.202Z"
},
"custom-marketplace": {
"source": {
"source": "file",
"path": "../../../tools/claude/marketplace.json"
},
"installLocation": "../../../tools/claude/marketplace.json",
"lastUpdated": "2025-11-22T20:27:44.231Z"
}
}
### The Problem
The
installPathincludesmarketplace.jsonas if it were a directory:../../.claude-plugin/marketplace.json/plugins/project-shared-skills../../.claude-plugin/plugins/project-shared-skillsSince
marketplace.jsonis a file (not a directory), the path doesn't exist:``
bash
``$ ls "../../.claude-plugin/marketplace.json/plugins/project-shared-skills"
ls: cannot access '../../.claude-plugin/marketplace.json/plugins/project-shared-skills': Not a directory
### Debug Logs
From the initial startup with empty caches:
``
``2025-11-22T20:27:42.126Z [DEBUG] Found 1 plugins (1 enabled, 0 disabled)
2025-11-22T20:27:42.127Z [DEBUG] Plugin not available for MCP: project-shared-skills@project-plugins - error
type: plugin-not-found
2025-11-22T20:27:42.127Z [DEBUG] Plugin not available for MCP: custom-plugin@custom-marketplace - error type:
plugin-not-found
...
2025-11-22T20:27:44.151Z [DEBUG] Found 3 extra marketplaces in settings
2025-11-22T20:27:44.174Z [DEBUG] Loaded plugins - Enabled: 1, Disabled: 0, Commands: 0, Agents: 0, Errors: 2
2025-11-22T20:27:44.174Z [DEBUG] Installing 2 marketplaces automatically
2025-11-22T20:27:44.177Z [DEBUG] Setting installation status: 2 marketplaces, 3 installable plugins, 0
uninstallable plugins
2025-11-22T20:27:44.204Z [DEBUG] Added marketplace source: project-plugins
2025-11-22T20:27:44.218Z [DEBUG] Installing 1 plugins from newly installed marketplace project-plugins
2025-11-22T20:27:44.232Z [DEBUG] Added marketplace source: custom-marketplace
2025-11-22T20:27:44.234Z [DEBUG] Installing 1 plugins from newly installed marketplace custom-marketplace
The marketplaces are discovered and "installed," but the plugins fail to load because the paths are
malformed.
### Impact
This bug affects:
extraKnownMarketplacesand pluginsare auto-installed
~/.claude/plugins/and restart"path": "../../.claude-plugin/marketplace.json"Once the bug occurs, the malformed paths persist in
installed_plugins.jsonand plugins remain broken untilmanual intervention.
### Original Issue Description Was Accurate
The original issue description correctly identified the root cause:
> The plugin installation logic appears to concatenate:
>
> - Marketplace source path:
../../.claude-plugin/marketplace.json> - Plugin source path from marketplace:
./plugins/project-shared-skills> - Resulting in:
../../.claude-plugin/marketplace.json/plugins/project-shared-skills>
> The logic should strip the filename from the marketplace path or use the marketplace's directory as the
base.
This is exactly what's happening.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
This is definitely still happening in claude 2.0.74
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.