LSP plugin installation ignores CLAUDE_CONFIG_DIR, uses hardcoded ~/.claude/

Status Fixed / completed
Reported on v2.1.138
Maintainer reply None cached
Activity 4 comments · opened May 9, 2026 · closed May 9, 2026

Description

When CLAUDE_CONFIG_DIR is set to a custom path, the LSP plugin installer resolves source paths relative to the hardcoded default ~/.claude/ instead of $CLAUDE_CONFIG_DIR. Installation fails even though the plugin files exist at the correct location under the custom config dir.

Steps to Reproduce

  1. Set CLAUDE_CONFIG_DIR to a non-default path (e.g. /home/user/dotfiles/.claude)
  2. Open a .rs file — Claude Code prompts to install rust-analyzer-lsp
  3. Select "Yes, install rust-analyzer-lsp"

Error

Failed to install: Source path does not exist:
/home/anders/.claude/plugins/marketplaces/claude-plugins-official/plugins/rust-analyzer-lsp

Expected Behavior

The installer should resolve plugin source paths using $CLAUDE_CONFIG_DIR (or whatever resolved config dir is active), not the hardcoded ~/.claude/.

The plugin files are present at the correct location:
$CLAUDE_CONFIG_DIR/plugins/marketplaces/claude-plugins-official/plugins/rust-analyzer-lsp

Environment

  • Claude Code: 2.1.138
  • OS: Linux (Arch Linux 6.19.14)
  • Shell: fish
  • CLAUDE_CONFIG_DIR: set to a custom dotfiles path

View original on GitHub ↗

4 Comments

github-actions[bot] · 5 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/55456
  2. https://github.com/anthropics/claude-code/issues/42217
  3. https://github.com/anthropics/claude-code/issues/47056

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

purew · 5 months ago
socketbox · 4 months ago

Hitting this same bug today on pr-review-toolkit (not LSP-specific). Same error shape:

Failed to install: Source path does not exist:
/home/socketbox/.claude/plugins/marketplaces/claude-plugins-official/plugins/pr-review-toolkit

My CLAUDE_CONFIG_DIR=/home/socketbox/.claude-pbs_coe, and the plugin is present at the correct location under that dir:

/home/socketbox/.claude-pbs_coe/plugins/marketplaces/claude-plugins-official/plugins/pr-review-toolkit/
├── .claude-plugin/
├── agents/
├── commands/
├── LICENSE
└── README.md

The marketplace marketplace.json declares "source": "./plugins/pr-review-toolkit" (relative), and the installer is resolving that against hardcoded ~/.claude/ rather than $CLAUDE_CONFIG_DIR. ~/.claude/ doesn't exist on my system at all.

Suboptimal workaround: mkdir -p ~/.claude && ln -s "<CLAUDE_CONFIG_DIR>/plugins" ~/.claude/plugins.

Re: closure as duplicate of #55456 — respectfully, I think that was a misclassification. #55456 is about ~/.claude/settings.json (and its declared fields) bleeding into sessions launched with CLAUDE_CONFIG_DIR set. That's a config-file-loading bug. This issue is about the plugin installer's source path resolution using a hardcoded ~/.claude/ prefix — a separate code path that affects plugin install even when no ~/.claude/settings.json exists. Could this be reopened?

Environment: Claude Code on Linux (Arch), CLAUDE_CONFIG_DIR set to a non-default path, no ~/.claude/ directory.

github-actions[bot] · 3 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.