claude-code - 💡(How to fix) Fix CLI: Auto-install plugins from org managed settings (extraKnownMarketplaces + enabledPlugins) [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#45323Fetched 2026-04-09 08:08:00
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×3subscribed ×1

Fix Action

Fix / Workaround

This creates friction for organizations distributing internal plugins — there's no way to ensure CLI users have the correct plugins without manual steps or building workarounds like CLAUDE_CODE_PLUGIN_SEED_DIR into Docker images.

Workarounds considered

RAW_BUFFERClick to expand / collapse

Problem

Plugins configured in org managed settings (extraKnownMarketplaces + enabledPlugins) do not auto-install in the CLI. They work in the desktop app and web app, but CLI users must manually run /plugin marketplace add and /plugin install.

This creates friction for organizations distributing internal plugins — there's no way to ensure CLI users have the correct plugins without manual steps or building workarounds like CLAUDE_CODE_PLUGIN_SEED_DIR into Docker images.

Current behavior

  1. Admin configures extraKnownMarketplaces and enabledPlugins in managed settings (Admin Console > Claude Code > Managed settings)
  2. CLI fetches managed settings at startup → cached in ~/.claude/remote-settings.json
  3. The marketplace is not registered in ~/.claude/plugins/known_marketplaces.json
  4. The plugin is not installed
  5. User must manually add the marketplace and install the plugin

Expected behavior

  1. Admin configures extraKnownMarketplaces and enabledPlugins in managed settings
  2. CLI fetches managed settings at startup
  3. Marketplace is automatically registered and fetched
  4. Plugins listed in enabledPlugins are automatically installed
  5. User starts a session with the plugin already active

Workarounds considered

  • CLAUDE_CODE_PLUGIN_SEED_DIR: Works for Docker/container environments but requires baking plugins into the image at build time, managing GitHub tokens as build secrets, and rebuilding to update
  • Entrypoint scripts: Adds startup latency and requires network + auth at runtime
  • Manual install docs: Defeats the purpose of org-managed settings

Prior issues

  • #23737 — closed as duplicate of #19275
  • #28310 — closed as duplicate of #19275
  • #19275 — closed as "not planned" (was filed as a bug about race conditions, not as a feature request)

None of these resulted in the feature actually shipping for CLI.

Environment

  • Claude Code CLI (via curl -fsSL https://claude.ai/install.sh | bash)
  • macOS + Linux (Docker containers)
  • Organization using Claude for Enterprise with managed settings

extent analysis

TL;DR

The most likely fix is to enhance the CLI to automatically register and install plugins configured in org managed settings.

Guidance

  • Review the code responsible for fetching managed settings at startup to ensure it correctly handles extraKnownMarketplaces and enabledPlugins.
  • Modify the CLI to automatically register the marketplace and install plugins listed in enabledPlugins after fetching managed settings.
  • Consider adding a flag or option to the CLI to enable or disable automatic plugin installation for debugging and testing purposes.
  • Investigate the feasibility of integrating the CLAUDE_CODE_PLUGIN_SEED_DIR workaround as a temporary solution for Docker/container environments.

Example

No code snippet is provided due to the lack of specific implementation details in the issue.

Notes

The solution may require changes to the CLI's startup logic and plugin management code. Additionally, the issue's history suggests that this feature has been previously requested but not implemented, so it may be necessary to revisit the feature request or bug report.

Recommendation

Apply a workaround, such as using CLAUDE_CODE_PLUGIN_SEED_DIR in Docker/container environments, until a permanent solution is implemented. This is because the workaround provides a functional, albeit imperfect, solution for organizations distributing internal plugins.

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…

FAQ

Expected behavior

  1. Admin configures extraKnownMarketplaces and enabledPlugins in managed settings
  2. CLI fetches managed settings at startup
  3. Marketplace is automatically registered and fetched
  4. Plugins listed in enabledPlugins are automatically installed
  5. User starts a session with the plugin already active

Still need to ship something?

×6

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

Back to top recommendations

TRENDING