Skip to content

Bug: Project-scoped plugins incorrectly detected as installed globally #14202

Description

@ianaswanson

Summary

When a plugin is installed with --scope project, other projects incorrectly show the plugin as "(installed)" in the Marketplaces view and refuse to install it, even though it's not active in those projects.

Claude Code Version: 2.0.70

Steps to Reproduce

  1. Create a local plugin marketplace with a plugin (e.g., my-plugin@my-marketplace)

  2. In Project A, install the plugin with project scope:

    /plugin marketplace add /path/to/marketplace
    /plugin install my-plugin@my-marketplace --scope project
    
  3. Verify it works in Project A:

    • /plugin → Installed tab shows the plugin ✓
  4. Open Claude Code in Project B (different directory)

  5. Run /plugin and navigate to Marketplaces tab

    Expected: Plugin shows as available to install (not installed in this project)

    Actual: Plugin shows "(installed)" with a checkmark

  6. Try to install the plugin for Project B:

    /plugin install my-plugin@my-marketplace --scope project
    

    Expected: Plugin installs for Project B

    Actual: Installation fails/skips because Claude Code thinks it's already installed

  7. Check Installed tab in Project B

    Result: Plugin does NOT appear in Installed tab (correctly filtered by projectPath)

Root Cause Analysis

The bug is an inconsistency in how projectPath is checked across different plugin operations:

Operation Checks projectPath? Behavior
Marketplaces "(installed)" indicator ❌ No Shows installed globally
Install command ❌ No Refuses if exists globally
Installed tab listing ✓ Yes Correctly filters by project

The plugin registry at ~/.claude/plugins/installed_plugins.json correctly stores projectPath for project-scoped installs, but the Marketplaces view and install command only check if the plugin key exists in the registry, not whether it's installed for the current project.

Workaround

Manually add the new project to ~/.claude/plugins/installed_plugins.json and create .claude/settings.json in the target project with enabledPlugins reference.

Impact

This bug prevents using the same local plugin across multiple projects with project-scoped isolation, which is a core use case for local plugin marketplaces in monorepos or multi-project setups.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:corebugSomething isn't workinghas reproHas detailed reproduction steps

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions