claude-code - 💡(How to fix) Fix enabledPlugins version constraints (array format) don't work [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#46934Fetched 2026-04-12 13:29:19
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×3closed ×1cross-referenced ×1

The enabledPlugins setting in .claude/settings.json accepts an array of strings according to the schema, described as supporting "extended format with version constraints." However, version constraints don't appear to be enforced.

Error Message

The plugin installs and loads regardless of the version constraint. The array format is accepted without error but the constraint is not enforced.

Root Cause

The plugin should NOT install/load because 3.0.0 is outside the ^2.0.0 range.

Code Example

{
     "enabledPlugins": {
       "my-plugin@my-marketplace": ["^2.0.0"]
     }
   }
RAW_BUFFERClick to expand / collapse

Description

The enabledPlugins setting in .claude/settings.json accepts an array of strings according to the schema, described as supporting "extended format with version constraints." However, version constraints don't appear to be enforced.

Steps to Reproduce

  1. Set up a marketplace with a plugin at version 2.0.0
  2. In .claude/settings.json, enable the plugin with a version constraint:
    {
      "enabledPlugins": {
        "my-plugin@my-marketplace": ["^2.0.0"]
      }
    }
  3. Bump the plugin to version 3.0.0 in the marketplace
  4. Clear the plugin cache (~/.claude/plugins/cache/<marketplace>/<plugin>/)
  5. Remove the entry from ~/.claude/plugins/installed_plugins.json
  6. Delete and re-clone the marketplace (~/.claude/plugins/marketplaces/<marketplace>/)
  7. Restart Claude Code

Expected Behavior

The plugin should NOT install/load because 3.0.0 is outside the ^2.0.0 range.

Actual Behavior

The plugin installs and loads regardless of the version constraint. The array format is accepted without error but the constraint is not enforced.

Additional Context

  • The JSON schema for settings.json describes enabledPlugins values as supporting boolean or array of strings with "extended format with version constraints"
  • No documentation exists for the array format syntax
  • This feature would be valuable for large teams (100+ developers) sharing plugins via extraKnownMarketplaces, where breaking changes in plugins need to be managed carefully

extent analysis

TL;DR

The issue can be mitigated by using a different version constraint syntax or waiting for an official fix, as the current implementation of version constraints in enabledPlugins setting does not work as expected.

Guidance

  • Verify that the enabledPlugins setting is correctly formatted and that the version constraint syntax is as expected, considering the lack of documentation on the array format syntax.
  • Test with different version constraint syntax, such as ~2.0.0 or 2.0.0, to see if any of them are enforced correctly.
  • Consider reaching out to the developers or maintainers of Claude for clarification on the correct usage of version constraints in enabledPlugins.
  • Evaluate the possibility of manually managing plugin versions outside of the enabledPlugins setting to ensure compatibility and control over plugin updates.

Notes

The issue seems to be related to the implementation of version constraints in the enabledPlugins setting, and without further information or documentation, it's difficult to provide a definitive solution. The lack of documentation on the array format syntax adds to the uncertainty.

Recommendation

Apply workaround: Given the current state, it might be necessary to manage plugin versions manually or explore alternative methods to control plugin updates until an official fix or clarification is provided.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING