bug: `claude plugin uninstall` gives contradictory scope error messages
Bug Description
The claude plugin uninstall command gives contradictory error messages about plugin scope, making it impossible to uninstall a plugin via CLI.
Steps to Reproduce
- Have a plugin installed (in this case
pr-review-toolkit@claude-code-pluginswas in~/.claude/settings.jsonunderenabledPlugins) - Try to uninstall without specifying scope:
``bash`
claude plugin uninstall pr-review-toolkit
Plugin "pr-review-toolkit" is installed in project scope, not user. Use --scope project to uninstall.`
**Error**:
- Try with
--scope project:
``bash`
claude plugin uninstall pr-review-toolkit --scope project
Plugin "pr-review-toolkit" is not installed in project scope. Use --scope to specify the correct scope.`
**Error**:
- Try with
--scope user:
``bash`
claude plugin uninstall pr-review-toolkit --scope user
Plugin "pr-review-toolkit" is installed in project scope, not user. Use --scope project to uninstall.`
**Error**:
- Try with full plugin name including marketplace:
``bash`
claude plugin uninstall "pr-review-toolkit@claude-code-plugins" --scope user
Plugin "pr-review-toolkit@claude-code-plugins" is installed in project scope, not user. Use --scope project to uninstall.`
**Error**:
Expected Behavior
The CLI should correctly identify which scope the plugin is installed in and allow uninstallation with the appropriate --scope flag.
Actual Behavior
The CLI gives contradictory error messages - it says the plugin is in project scope, but when you specify project scope it says it's not there, creating an impossible loop.
Workaround
Manually edit ~/.claude/settings.json and remove the plugin from the enabledPlugins object.
Environment
- Claude Code version: (current as of 2025-01-04)
- OS: macOS Darwin 24.6.0
- Plugin location:
~/.claude/settings.jsonunderenabledPlugins
Additional Context
The plugin was configured in user settings as:
"enabledPlugins": {
"pr-review-toolkit@claude-code-plugins": true,
...
}
The scope detection logic appears to be incorrectly identifying the plugin's location.
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗