Skip to content

plugins: project-scope pins accumulate per worktree (15 paths x ~60 plugins, 3 paths gone, 412 cached versions) #3688

Description

@kyle-sexton

Summary

~/.claude/plugins/installed_plugins.json on the laptop carries project-scope entries for 15 project paths, each pinning roughly 57 to 65 plugins at the version current when that project first enabled them. Three of those paths no longer exist on disk. The pins never update, so the plugin cache holds 412 version directories (963 MB) and the file keeps growing with every worktree that has a .claude/settings.json enabling the fleet.

Evidence (2026-09-02, Claude Code 2.1.259)

  • jq over installed_plugins.json: project-scope pins per path: claude-code-plugins 65, six D:\worktrees\ccp-* paths 63-64 each, chezmoi source 63, provisioning 57, and three paths that no longer exist (chezmoi-worktrees\...-feat-cross-platform-wsl, chezmoi\.claude\worktrees\linux-lane-parity, D:\worktrees\dotfiles-statusline).
  • guardrails alone: user scope 0.31.2, project pins at 0.29.9, 0.29.12 (x9), 0.30.0 (x6).
  • Transcripts from sessions in the claude-code-plugins checkout reference plugins/cache/melodic-software/guardrails/0.31.1, the user-scope version at the time, so the user scope wins and the pins are not running stale hook code. They are disk and clutter only.
  • The plugins reference says orphaned versions are swept about 14 days after an update or uninstall; a project-scope pin is never updated, so nothing ever orphans it.

Why it matters

Every new worktree of a repo whose project settings enable the fleet adds another ~60 pinned installs. The cache never shrinks, installed_plugins.json grows, and claude plugin list prints every pin of every path, which is what makes "which version is running here" hard to answer at a glance.

Suggested handling

  1. Decide whether project settings should enable plugins at all when the user scope already does; a project enabledPlugins block that mirrors the user scope buys nothing on a single-operator fleet and is the source of every pin.
  2. If they stay, add a sweep to the disk-hygiene or claude-ops audit: claude plugin uninstall <plugin> --scope project for pins whose projectPath no longer exists, and a report of pins that are more than N versions behind the user scope.
  3. Consider claude plugin prune --scope project coverage in the same sweep.

Verification

jq -r '.plugins | to_entries[] | .value[] | select(.scope=="project") | .projectPath' ~/.claude/plugins/installed_plugins.json | sort -u lists the paths; test each with Test-Path.

No related issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

priority: mediumReal value, no hard deadline; normal backlog flow.status: needs-decisionAwaiting a human or maintainer judgment call.work-class: structuralRefactors, migrations, contract changes; cross-cutting and hard to reverse.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions