Local-scope plugin records written for git worktrees never update (claude plugin update --scope local ignores the cwd; the records have no auto)

Open
#110,633 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
backend, cli

Research direction

The report identifies claude plugin update --scope local, claude plugin list, and records in ~/.claude/plugins/installed_plugins.json; it does not name source files or tests. Start by tracing how the CLI selects local plugin records from the current working directory and how worktree records are created. Done when updating from a worktree updates the record for that worktree or the behavior follows one of the alternatives in the issue, with the reproduced stale version resolved.

Written by the indexing model from the issue text.

Description

area:plugins bug has repro platform:macos

Local-scope plugin records written for git worktrees never update (claude plugin update --scope local ignores the cwd; the records have no auto)

Environment: Claude Code 2.1.326, macOS, a plugin from a GitHub marketplace installed with --scope local in a repository's main checkout. The project's .claude/settings.local.json (which enables the plugin) is copied into each new git worktree of that repository.

What happens
  1. When a session first starts in a git worktree of that repo, Claude Code writes a second local record for the plugin into ~/.claude/plugins/installed_plugins.json, with projectPath = the worktree, at the version current that day. Unlike the main checkout's record, it has no "auto": true.
  2. Marketplace auto-update later updates the main checkout's record (it has auto: true), but never the worktree's.
  3. Running claude plugin update <plugin>@<marketplace> --scope local --json from inside the worktree does not update the worktree's record either. It answers for the main checkout's record:
    {"message":"<plugin> is already at the latest version (1.3.7).","updateOutcome":"up_to_date","oldVersion":"1.3.7","newVersion":"1.3.7"}
    
    while the worktree's record still says "version": "1.3.4". claude plugin list --json prints the same four records whether run from the worktree or the main checkout.

Resulting installed_plugins.json (paths shortened):

"<plugin>@<marketplace>": [
  { "scope": "local", "projectPath": "/…/repo",            "version": "1.3.7", "installPath": "…/cache/<marketplace>/<plugin>/1.3.7", "auto": true, "lastUpdated": "2026-11-17T10:49:58Z" },
  { "scope": "local", "projectPath": "/…/repo-worktrees/x", "version": "1.3.4", "installPath": "…/cache/<marketplace>/<plugin>/1.3.4", "installedAt": "2026-11-17T06:46:18Z", "lastUpdated": "2026-11-17T06:46:18Z" }
]
Expected

Either:

  • claude plugin update --scope local updates the local record whose projectPath matches the cwd (or offers a --project <path> option), and records written for worktrees get auto like the one they were derived from; or
  • a worktree uses the main checkout's local install, without a record of its own.
Impact

Sessions in that worktree keep the plugin version from the day the worktree's first session started, with no supported way to update them short of editing installed_plugins.json. Tooling that checks "is every install current?" after claude plugin update sees the worktree record stay behind and reports the update as failed.

Steps to reproduce
  1. In a repo, claude plugin install <plugin>@<marketplace> --scope local.
  2. Copy .claude/settings.local.json into a new git worktree add ../wt, start claude in ../wt once and exit.
  3. Publish a newer plugin version; update the marketplace.
  4. cd ../wt && claude plugin update <plugin>@<marketplace> --scope local --json: it reports the main checkout's version as up to date; the ../wt record in installed_plugins.json keeps the old version and has no auto.
Dominant language
TypeScript
Stars
156k
Forks
25k
Avg merge
16h 19m
Merged PRs (30d)
5

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • No Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from anthropics/claude-code

All issues in anthropics/claude-code

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.