anthropics / anthropics/claude-code

`claude plugin enable|disable --scope project` rewrites .claude/settings.json and empties `footerLinksRegexes`

Offen
#92,918 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area:plugins bug has repro platform:macos
Vorherrschende Sprache
Python
Sterne
145k
Forks
23.1k
PR-Merge-Kennzahlen
PR-Kennzahlen ausstehend

Beschreibung

**Version:** Claude Code 2.1.261, macOS (Darwin 27.0.0)

**What happens**

Running `claude plugin enable ` or `claude plugin disable ` with `--scope project` (or with no scope when the plugin is installed at project scope) rewrites the whole `.claude/settings.json`:

1. Keys are reordered (`statusLine`, `subagentStatusLine`, `enabledPlugins`, `footerLinksRegexes` move to the end).
2. `footerLinksRegexes` is replaced with an empty array `[]` every time, whatever it contained. Tested with `["graft/[\\w./-]+\\.md"]` and with the trivial `["graft/.*"]`; both come back as `[]`.
3. Unknown top-level keys survive (a probe key `"zzzProbe": 1` was kept), so this is specific to `footerLinksRegexes`, not a general schema strip.

**Expected**

Only `enabledPlugins` should change. Other keys and their order should be left as they were.

**Repro**

```sh
mkdir repro && cd repro && git init -q
mkdir .claude
cat > .claude/settings.json <<'EOF'
{
"footerLinksRegexes": ["graft/.*"],
"enabledPlugins": {}
}
EOF
claude plugin enable superpowers@claude-plugins-official --scope project
cat .claude/settings.json # footerLinksRegexes is now []
```

**Impact**

The `footerLinksRegexes` entry is written by the `@nanonets/graft` tool's `graft init` to make its footer links clickable. Any plugin toggle silently removes it in a checked-in file, so the breakage lands in the repo unnoticed unless someone diffs settings after a plugin command.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Reproduce the loss using the provided commands and inspect .claude/settings.json before and after a project-scope plugin toggle. Trace the settings rewrite triggered by `claude plugin enable|disable --scope project`, focusing on why footerLinksRegexes becomes an empty array. Done means only enabledPlugins changes while footerLinksRegexes, unknown keys, and existing ordering remain intact.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Bereich
cli
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Aktiv
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
55/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.