Project-scoped plugins not inherited by worktrees created via EnterWorktree

Resolved 💬 3 comments Opened Apr 9, 2026 by douglasholm Closed Apr 9, 2026

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:

  1. The worktree is the same logical project (same repo, same remote, checked in to the same .claude/ config).
  2. 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

  1. In project ~/code/myproject, run /plugin install somePlugin@someMarketplace (defaults to project scope).
  2. Confirm it loads: /reload-plugins shows the plugin.
  3. Create a worktree: git worktree add .claude/worktrees/feature-x (or use EnterWorktree).
  4. Launch Claude Code inside .claude/worktrees/feature-x.
  5. Plugin is not available. /reload-plugins does not help.
  6. ~/.claude/plugins/installed_plugins.json shows 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 list is enough.
  • Or: make user scope the sensible default for /plugin install so 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-parent to 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, playwright from claude-plugins-official

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗