Project-scoped plugins not inherited by worktrees created via EnterWorktree
Summary
Plugins installed with scope: project are registered against a single projectPath in ~/.claude/plugins/installed_plugins.json. When a new git worktree is created (via EnterWorktree or any other mechanism), the worktree has a different absolute path and therefore does not inherit the parent project's plugin registrations, even though:
- The worktree is the same logical project (same repo, same remote, checked in to the same
.claude/config). - The plugin files themselves already live in the shared
~/.claude/plugins/cache/and don't need to be copied anywhere — only the enablement record needs to be duplicated.
The result is that every new worktree silently loses all project-scoped plugins until the user manually re-runs /plugin install inside it.
Repro
- In project
~/code/myproject, run/plugin install somePlugin@someMarketplace(defaults to project scope). - Confirm it loads:
/reload-pluginsshows the plugin. - Create a worktree:
git worktree add .claude/worktrees/feature-x(or useEnterWorktree). - Launch Claude Code inside
.claude/worktrees/feature-x. - Plugin is not available.
/reload-pluginsdoes not help. ~/.claude/plugins/installed_plugins.jsonshows the plugin registered only against~/code/myproject, not the worktree path.
Expected behavior
One of:
- Auto-inheritance:
EnterWorktree(and/or Claude Code's project-root resolution) should treat worktrees as the same project as their parent and inherit plugin registrations automatically. Detecting a worktree is cheap —git rev-parse --show-toplevel+git worktree listis enough. - Or: make user scope the sensible default for
/plugin installso plugins aren't silently tied to one path in the first place. Most users installing a language server, design tool, or docs lookup plugin want it everywhere, not just in the current cwd. - Or, at minimum: when Claude Code starts in a directory that is a worktree of a project with registered plugins, surface a one-line hint: "This worktree has no plugins installed. Parent project has: X, Y, Z. Run
/plugin sync-from-parentto inherit."
Why this matters
Running multiple Claude Code instances in parallel worktrees of the same repo is a documented, encouraged workflow (it's literally what EnterWorktree exists for). Plugins silently not loading across worktrees breaks that workflow in a way that's hard to diagnose — the user sees the plugin installed in installed_plugins.json, runs /reload-plugins, and nothing happens, with no indication why.
Workaround
Reinstall each plugin at user scope:
/plugin uninstall <name>@<marketplace> --scope project
/plugin install <name>@<marketplace> --scope user
Works, but requires the user to already know that project scope is worktree-hostile, which is not discoverable.
Environment
- Claude Code (TUI), macOS (Darwin 24.6.0)
- Plugins affected in my case:
context7,frontend-design,typescript-lsp,playwrightfromclaude-plugins-official
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗