claude-code - 💡(How to fix) Fix [BUG] Plugins are installed and uninstalled globally even when using multiple CLAUDE_CONFIG_DIR directories [1 comments, 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#46042Fetched 2026-04-11 06:30:29
View on GitHub
Comments
1
Participants
1
Timeline
6
Reactions
0
Author
Participants
Timeline (top)
labeled ×4closed ×1commented ×1

Error Message

Error Messages/Logs

Code Example



---

alias claude-foo='CLAUDE_CONFIG_DIR=~/.claude-foo command claude'
alias claude-default='CLAUDE_CONFIG_DIR=~/.claude command claude'
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

I'm using multiple local "profiles" via different CLAUDE_CONFIG_DIR settings (same account). Although installed plugins are supposed to be installed within the config dir, installing or uninstalling a plugin in one profile affects all others.

What Should Happen?

Installed plugins should be separate per config dir.

Error Messages/Logs

Steps to Reproduce

  1. Copy ~/.claude to ~/.claude-foo
  2. In ~/.zshrc add:
alias claude-foo='CLAUDE_CONFIG_DIR=~/.claude-foo command claude'
alias claude-default='CLAUDE_CONFIG_DIR=~/.claude command claude'
  1. Run claude-foo.
  2. Run /plugin
  3. Install a plugin, e.g. frontend-design
  4. exit
  5. Run claude-default
  6. Run /plugin, go to Installed
  7. Surprise! frontend-plugin is there now.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.98

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

extent analysis

TL;DR

The issue can be mitigated by ensuring that the CLAUDE_CONFIG_DIR environment variable is properly isolated for each profile, potentially by modifying the alias commands to invoke a new shell session.

Guidance

  • Verify that the CLAUDE_CONFIG_DIR environment variable is not being leaked between shell sessions, potentially by adding an env command to the alias to print the current environment variables.
  • Consider modifying the alias commands to invoke a new shell session using bash -c or a similar approach to ensure a clean environment for each profile.
  • Check if there are any global configuration files or caches that may be shared between profiles, which could be causing the plugin installation to affect all profiles.
  • Test the plugin installation process with a different plugin to see if the issue is specific to the frontend-design plugin.

Example

alias claude-foo='bash -c "CLAUDE_CONFIG_DIR=~/.claude-foo command claude"'
alias claude-default='bash -c "CLAUDE_CONFIG_DIR=~/.claude command claude"'

Notes

The issue may be related to the way the CLAUDE_CONFIG_DIR environment variable is being set and propagated between shell sessions. Further investigation is needed to determine the root cause.

Recommendation

Apply workaround: Modify the alias commands to invoke a new shell session to ensure a clean environment for each profile. This should help mitigate the issue until a more permanent fix can be found.

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