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_DIR environment 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
claude in external terminal
- Execute
/ide command
- 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
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.
Problem Description
When the
CLAUDE_CONFIG_DIRenvironment variable is set to a custom directory, the/idecommand fails to detect available IDEs, even when VS Code with the Claude Code extension is running properly.Root Cause
~/.claude/ide/location$CLAUDE_CONFIG_DIR/ide/locationEnvironment Details
CLAUDE_CONFIG_DIR=C:\Users\[user]\.config\claudeReproduction Steps
CLAUDE_CONFIG_DIRenvironment variable to custom directory (e.g.,C:\Users\[user]\.config\claude)claudein external terminal/idecommandExpected vs Actual Behavior
Expected: IDE detection should respect
CLAUDE_CONFIG_DIRand find VS Code regardless of config directory locationActual:
~/.claude/ide/[port].lock$CLAUDE_CONFIG_DIR/ide/[port].lockWorking Workaround
Create a Windows junction to bridge both locations:
After applying this workaround,
/idecommand correctly detects and connects to VS Code.Impact
Related Issues
CLAUDE_CONFIG_DIRbehavior and documentation~/.claudeappear to contradict actual CLI app behavior #2277Suggested Fix
The IDE integration logic should respect the
CLAUDE_CONFIG_DIRenvironment variable and create/search for lock files in$CLAUDE_CONFIG_DIR/ide/instead of the hardcoded default location.