[BUG] /ide command fails when CLAUDE_CONFIG_DIR is set - IDE integration doesn't respect custom config directory
Resolved 💬 9 comments Opened Jul 29, 2025 by christopher-buss 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.
This issue has 9 comments on GitHub. Read the full discussion on GitHub ↗