claude-code - 💡(How to fix) Fix Plugin/skill discovery doesn't traverse parent directories [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#46107Fetched 2026-04-11 06:28:50
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×4commented ×1

When Claude Code is launched from a subdirectory of a git repo, plugins enabled in the repo root's .claude/settings.json are not discovered. The plugin loader appears to only check the CWD for .claude/settings.json, unlike CLAUDE.md which correctly traverses up the directory tree.

Root Cause

When Claude Code is launched from a subdirectory of a git repo, plugins enabled in the repo root's .claude/settings.json are not discovered. The plugin loader appears to only check the CWD for .claude/settings.json, unlike CLAUDE.md which correctly traverses up the directory tree.

Fix Action

Workaround

Duplicate the .claude/settings.json (with enabledPlugins and extraKnownMarketplaces) into the subdirectory.

Code Example

repo-root/
├── .claude/
│   └── settings.json          ← has enabledPlugins + extraKnownMarketplaces
└── deeply/nested/subdir/
    └── (no .claude/settings.json)
RAW_BUFFERClick to expand / collapse

Description

When Claude Code is launched from a subdirectory of a git repo, plugins enabled in the repo root's .claude/settings.json are not discovered. The plugin loader appears to only check the CWD for .claude/settings.json, unlike CLAUDE.md which correctly traverses up the directory tree.

Repro

Given this repo structure:

repo-root/
├── .claude/
│   └── settings.json          ← has enabledPlugins + extraKnownMarketplaces
└── deeply/nested/subdir/
    └── (no .claude/settings.json)
  1. Launch Claude Code from repo-root//skills shows all plugin skills ✅
  2. Launch Claude Code from repo-root/deeply/nested/subdir//skills shows 0 plugin skills ❌
  3. /reload-plugins from the subdirectory reports 0 plugins · 0 skills

Expected behavior

Plugins enabled in a parent directory's .claude/settings.json (up to the git root) should be inherited by subdirectories, consistent with how CLAUDE.md files are resolved.

Environment

  • Claude Code v2.1.92
  • macOS (Darwin 25.4.0)
  • Custom marketplace plugin (extraKnownMarketplaces pointing to a private GitHub repo)
  • installed_plugins.json has the plugin scoped to the repo root projectPath

Workaround

Duplicate the .claude/settings.json (with enabledPlugins and extraKnownMarketplaces) into the subdirectory.

extent analysis

TL;DR

The plugin loader should be modified to traverse up the directory tree to discover .claude/settings.json files, similar to how CLAUDE.md files are resolved.

Guidance

  • Verify that the issue is specific to the plugin loader by checking if CLAUDE.md files are correctly resolved when launched from a subdirectory.
  • Check the installed_plugins.json file to ensure the plugin is scoped to the correct project path.
  • Consider modifying the plugin loader to recursively search for .claude/settings.json files in parent directories.
  • Test the workaround of duplicating the .claude/settings.json file in the subdirectory to confirm it resolves the issue.

Example

No code snippet is provided as the issue does not specify the implementation details of the plugin loader.

Notes

The issue may be specific to the custom marketplace plugin or the extraKnownMarketplaces configuration. Further investigation is needed to determine the root cause.

Recommendation

Apply workaround: Duplicate the .claude/settings.json file in the subdirectory, as it has been confirmed to resolve the issue temporarily. A permanent fix would require modifying the plugin loader to correctly traverse the directory tree.

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…

FAQ

Expected behavior

Plugins enabled in a parent directory's .claude/settings.json (up to the git root) should be inherited by subdirectories, consistent with how CLAUDE.md files are resolved.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING