[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
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

  1. Set CLAUDE_CONFIG_DIR environment variable to custom directory (e.g., C:\Users\[user]\.config\claude)
  2. Open VS Code with Claude Code extension installed and running
  3. Verify extension is active (check VS Code output panel shows "Claude code extension is now active")
  4. Run claude in external terminal
  5. Execute /ide command
  6. 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_DIR behavior 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.

View original on GitHub ↗

9 Comments

bijela-gora · 1 year ago

Oh, this why I have diffs in CLI instead of VS Code!
And this why I have ~/.claude/ide dir (it shouldn't exists because I defined CLAUDE_CONFIG_DIR from the very first claude run).

@christopher-buss thank you for reporting this.

github-actions[bot] · 1 year ago

Found 1 possible duplicate issue:

  1. https://github.com/anthropics/claude-code/issues/1698

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

epicwhale · 9 months ago

+1 to facing this bug too - so annoying! :(

github-actions[bot] · 8 months ago

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.

epicwhale · 8 months ago

This issue still happens

github-actions[bot] · 7 months ago

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.

epicwhale · 7 months ago

reopen - still an issue

marcindulak · 7 months ago

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.

github-actions[bot] · 6 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.