[BUG] `plugin uninstall -s project` deletes the enabledPlugins key, silently disabling the surviving user-scope install

Status Open
Reported on v2.1.220
Maintainer reply None cached
Activity 1 comment · opened Jul 25, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code (2.1.220)

What's Wrong?

claude plugin uninstall <plugin> -s project deletes the plugin's key from
enabledPlugins in ~/.claude/settings.json entirely, instead of only removing the
project-scope install record. If a user-scope installation of the same plugin
exists, it survives in installed_plugins.json but is no longer considered enabled,
so it silently stops loading in every project.

claude plugin list still shows the user-scope record afterwards, which makes the
breakage hard to spot — the plugin looks installed, but enabledPlugins no longer has
an entry for it and the loader skips it.

This is easy to hit while cleaning up the stale project-scope records described in
#73796: the documented-feeling repair (install at user scope, then drop the old
project-scope record) leaves the plugin disabled.

What Should Happen?

Uninstalling one scope should only remove that scope's install record. enabledPlugins
governs all scopes, so its key should be left alone when another scope's installation
of the same plugin remains.

At minimum, the command should warn that it is about to disable a plugin that is still
installed at another scope.

Steps to Reproduce

# starting point: plugin installed at project scope (see #73796 for how records end up
# project-scoped), and enabledPlugins["<plugin>"] == true in ~/.claude/settings.json

claude plugin install <plugin> -s user
# -> installed_plugins.json now has two records: scope=project and scope=user
# -> enabledPlugins["<plugin>"] still true

claude plugin uninstall <plugin> -s project --keep-data -y
# -> "Successfully uninstalled plugin: <plugin> (scope: project)"
# -> installed_plugins.json correctly keeps only the scope=user record
# -> BUT enabledPlugins["<plugin>"] is now GONE from ~/.claude/settings.json

Verify:

jq -r '.enabledPlugins["<plugin>"] // "(key absent)"' ~/.claude/settings.json
# (key absent)

claude --debug-file /tmp/pl.log -p "ok" < /dev/null > /dev/null 2>&1
grep -E 'Found [0-9]+ plugins' /tmp/pl.log

Observed before and after, in the same project directory:

before uninstall:  [DEBUG] Found 4 plugins (4 enabled, 0 disabled)
after  uninstall:  [DEBUG] Found 3 plugins (3 enabled, 0 disabled)

The plugin's Loaded N skills from plugin <plugin> lines disappear entirely. There is
no plugin-cache-miss and no other error — the plugin is simply not enabled any more.

Recovery:

claude plugin enable <plugin> -s user
# -> enabledPlugins["<plugin>"] == true again; plugin loads normally

Reproduced On

Two different plugins from two different marketplaces, same behaviour both times:

  • codex@openai-codex (git-source marketplace)
  • superpowers@claude-plugins-official (official marketplace)

Claude Code Version

2.1.220 (native install, channel latest)

Platform

Anthropic API (claude.ai subscription)

Operating System

Windows 11 (10.0.26200), Node v26.3.0

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗