claude-code - 💡(How to fix) Fix extraKnownMarketplaces with source: "directory" fails to load plugins from subdirectory [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#46753Fetched 2026-04-12 13:33:57
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×3commented ×1

Error Message

Actual: Plugin discovery silently fails from subdirectories. No error message shown.

Fix Action

Fix / Workaround

Workaround: Enable plugins in user-scope settings (~/.claude/settings.local.json) instead of project-level.

Code Example

{
  "enabledPlugins": {
    "myplugin@my-marketplace": true
  },
  "extraKnownMarketplaces": {
    "my-marketplace": {
      "source": {
        "source": "directory",
        "path": "/absolute/path/to/marketplace"
      }
    }
  }
}
RAW_BUFFERClick to expand / collapse

Bug: Plugins enabled via extraKnownMarketplaces using source: "directory" are not discovered when Claude Code is launched from a subdirectory of the git repo. Local skills/commands placed directly in .claude/ work fine from any subdirectory.

Repro steps:

  1. In a git repo at /repo-root/, create .claude/settings.local.json:
{
  "enabledPlugins": {
    "myplugin@my-marketplace": true
  },
  "extraKnownMarketplaces": {
    "my-marketplace": {
      "source": {
        "source": "directory",
        "path": "/absolute/path/to/marketplace"
      }
    }
  }
}
  1. The marketplace at the given path has a valid .claude-plugin/marketplace.json and a plugin with commands/skills.
  2. cd /repo-root/ && claude — plugin commands work.
  3. cd /repo-root/subdir/ && claude — plugin commands are not recognized.

Expected: Plugins resolve from any subdirectory within the repo, same as local .claude/skills/.

Actual: Plugin discovery silently fails from subdirectories. No error message shown.

Workaround: Enable plugins in user-scope settings (~/.claude/settings.local.json) instead of project-level.

Version: 2.1.101

extent analysis

TL;DR

The issue can be worked around by enabling plugins in user-scope settings instead of project-level settings.

Guidance

  • The problem seems to be related to the plugin discovery mechanism when Claude Code is launched from a subdirectory of the git repo.
  • To verify the issue, follow the provided repro steps and check if plugin commands work when launched from the repo root but not from a subdirectory.
  • The workaround provided in the issue body can be applied by moving the plugin enablement to ~/.claude/settings.local.json.
  • It's also worth checking the path field in the extraKnownMarketplaces setting to ensure it's correctly resolved when launched from a subdirectory.

Example

No code snippet is provided as the issue is more related to configuration and plugin discovery.

Notes

The issue seems to be specific to the plugin discovery mechanism when using source: "directory" in extraKnownMarketplaces. The provided workaround may not be ideal for all use cases, especially if project-level settings are preferred.

Recommendation

Apply workaround: Enable plugins in user-scope settings (~/.claude/settings.local.json) instead of project-level settings, as this is the only provided solution that has been confirmed to work.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING