[BUG] Can't detect VS Code in integrated terminal on native Windows installation
Open 💬 23 comments Opened Aug 5, 2025 by thegrahamking
Environment
- Platform (select one):
- [ ] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [x] Other: VS Code Extension v1.0.68
- Claude CLI version: v1.0.68
- Operating System: Windows 11 22H2 (OS Build 22621.5624)
- Terminal: Windows Terminal w/ PowerShell 7.5.2
Bug Description
VS Code is not detected when running claude /ide in the integrated terminal or clicking the Claude Code button in VS Code
Steps to Reproduce
- Ensure VS Code - Claude Code extension is installed and up to date
- Open folder in VS Code
- Click Claude Code button
- Wait for CC to load/prompt to be available
- Enter
/ideand press Enter
OR
- Ensure VS Code - Claude Code extension is installed and up to date
- Open folder in VS Code
- Open a new integrated terminal (
Ctrl + Shift + ') / Terminal -> New Terminal - Enter
claude /ideand press Enter
Expected Behavior
VS Code is detected, selectable and can be connected to
Actual Behavior
VS Code is not detected
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ Select IDE │
│ Connect to an IDE for integrated development features. │
│ │
│ No available IDEs detected. Make sure your IDE has the Claude Code extension or plugin installed and is running. │
│ │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Esc to exit
Additional Context
If I run claude /ide in an external terminal (i.e. seperate from VS Code) running in the same working directory as VS code then VS Code _is_ detected and can be connected to
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ Select IDE │
│ Connect to an IDE for integrated development features. │
│ │
│ 1. Visual Studio Code │
│ ❯ 2. None✔ │
│ │
│ ※ Tip: You can enable auto-connect to IDE in /config or with the --ide flag │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
23 Comments
Found 3 possible duplicate issues:
If your issue is a duplicate, please close it and 👍 the existing issue instead.
🤖 Generated with Claude Code
same issue
it's a bug for window, i think,
@wim-anthropic
@np-anthropic
@ah-anthropic
@cal-anthropic
I do not believe this is an _exact_ duplicate given that it is working in a seperate terminal, but not in the integrated on.
I'm inclined to agree given that I have the same issue in Rider #5154
I have the issue as well where it works in windows terminal, but not in my terminal in vscode.
I have the exact same issue https://github.com/anthropics/claude-code/issues/4662
Running vs code as admin seems to work
I've updated to
1.0.88. Running as admin or user makes no difference for me. Both still showI found a solution, just type
VSCODE_PID= VSCODE_CWD= TERM_PROGRAM= command claudein your VSCode integrated terminal (I use git-bash.exe)Or if you want to use the alias/function, you can just do it in your bashrc / zshrc like this:
enjoy
<img width="1150" height="831" alt="Image" src="https://github.com/user-attachments/assets/9b07f08a-f521-4c03-b991-ea59a71be00c" />
And If you use cmd as VSCode integrated terminal, you can do this:
@Molunerfinn You're an allstar, worked like a champ
I want to hijack this to say not only this reproduces on my vscode environment (vscode terminal claude doesnt find vscode) but also in any jetbrains IDE the jetbrains ide terminal also does not work but the windows terminal (seperated from ide) works in both cases
but when I use it on the seperate terminal after asking a question, the ctrl alt k shortcut stop working and tries to open a new claude code instance instead of referecing the file im currently at in the chat
thanks to @Molunerfinn Solution idea i was able to find a solution to the Jetbrains IDEs also :
if you use powershell :
$env:IDEA_INITIAL_DIRECTORY = ""
$env:__INTELLIJ_COMMAND_HISTFILE__ = ""
$env:TERMINAL_EMULATOR = ""
claude
JetBrains Claude-Code[Beta] settings :
$env:IDEA_INITIAL_DIRECTORY = ""; $env:INTELLIJ_COMMAND_HISTFILE = ""; $env:TERMINAL_EMULATOR = ""; claude<img width="739" height="304" alt="Image" src="https://github.com/user-attachments/assets/092b3b4d-928d-41d0-8ace-ccb1fd52228d" />
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.
Still experiencing this issue on v2.1.23 (latest channel).
Environment:
Symptoms:
claudein VS Code integrated terminal/idecommand shows "No available IDEs detected"~/.claude/ide/with correct VS Code PID and workspace infoWorkaround found:
Downgrading to stable channel fixes the issue:
This installs v2.1.7 where
/idecorrectly detects VS Code.Conclusion:
The bug appears to be a regression in the latest channel (v2.1.23). The stable version (v2.1.7) works correctly.
For Windows users using PowerShell in VS Code integrated terminal, add this to your PowerShell profile (
$PROFILE):Then reload your profile (
. $PROFILE) or open a new terminal. Now/ideworks correctly! 🎉That worked (at least in the current v2.1.27. For those of you who use native installer:
Today I had the same issue with Claude Code v2.1.29 and VS Code v1.108.2. This solution worked for me