[BUG] /ide command fails when CLAUDE_CONFIG_DIR is set - IDE integration doesn't respect custom config directory
Status Closed — not planned
Maintainer reply None cached
Workaround ✓ Mentioned in description ↑
Activity 9 comments · opened Jul 29, 2025 · closed Jan 31, 2026
Problem Description
When the CLAUDE_CONFIG_DIR environment variable is set to a custom directory, the /ide command fails to detect available IDEs, even when VS Code with the Claude Code extension is running properly.
Root Cause
- VS Code extension creates lock files in the default
~/.claude/ide/location - Claude CLI looks for lock files in
$CLAUDE_CONFIG_DIR/ide/location - This mismatch results in "No available IDEs detected" despite IDE being available
Environment Details
- OS: Windows 10 Pro (24H2)
- Claude Code Version: 1.0.63
- Shell: zsh/bash (MSYS2/Git Bash)
- IDE: Visual Studio Code with Claude Code extension
- Environment Variable:
CLAUDE_CONFIG_DIR=C:\Users\[user]\.config\claude
Reproduction Steps
- Set
CLAUDE_CONFIG_DIRenvironment variable to custom directory (e.g.,C:\Users\[user]\.config\claude) - Open VS Code with Claude Code extension installed and running
- Verify extension is active (check VS Code output panel shows "Claude code extension is now active")
- Run
claudein external terminal - Execute
/idecommand - Observe "No available IDEs detected" message
Expected vs Actual Behavior
Expected: IDE detection should respect CLAUDE_CONFIG_DIR and find VS Code regardless of config directory location
Actual:
- Lock files are created in
~/.claude/ide/[port].lock - CLI searches in
$CLAUDE_CONFIG_DIR/ide/[port].lock - IDE detection fails due to path mismatch
Working Workaround
Create a Windows junction to bridge both locations:
New-Item -ItemType Junction -Path "$env:CLAUDE_CONFIG_DIR\ide" -Target "$env:USERPROFILE\.claude\ide"
After applying this workaround, /ide command correctly detects and connects to VS Code.
Impact
- Breaks IDE integration functionality for users with custom config directories
- Affects users maintaining XDG-compliant directory structures
- Forces users to either abandon custom config directories or implement manual workarounds
Related Issues
- Related to #3833 regarding
CLAUDE_CONFIG_DIRbehavior and documentation - Similar to configuration directory inconsistencies mentioned in #2277
Suggested Fix
The IDE integration logic should respect the CLAUDE_CONFIG_DIR environment variable and create/search for lock files in $CLAUDE_CONFIG_DIR/ide/ instead of the hardcoded default location.
9 Comments
Oh, this why I have diffs in CLI instead of VS Code!
And this why I have
~/.claude/idedir (it shouldn't exists because I definedCLAUDE_CONFIG_DIRfrom the very firstclauderun).@christopher-buss thank you for reporting this.
Found 1 possible duplicate issue:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
+1 to facing this bug too - so annoying! :(
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
This issue still happens
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
reopen - still an issue
This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.
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.