[BUG] VSCode integrated terminal cannot detect 'code' command - IDE connection fails (Windows)
Resolved 💬 11 comments Opened Dec 9, 2025 by elfenlieds7 Closed Feb 8, 2026
Bug Description
When running Claude Code from VSCode's integrated terminal on Windows, the IDE detection fails with error:
'code' is not recognized as an internal or external command, operable program or batch file.
However, running Claude Code from an external terminal (Windows Terminal/CMD) works correctly and can detect/connect to VSCode.
Environment
- Claude Code version: 2.0.62
- OS: Windows 11
- VSCode version: 1.106.3
- Terminal: VSCode integrated terminal (PowerShell/bash)
- Claude Code Extension: anthropic.claude-code (installed and enabled)
Steps to Reproduce
- Open VSCode with a project folder
- Open VSCode's integrated terminal
- Run
claude - Run
/ideor check Status page
Expected: IDE should be detected and connected
Actual: Error message "'code' is not recognized as an internal or external command"
Workaround
Running Claude Code from an external Windows Terminal works:
cd C:\path\to\project
claude
/ide # Successfully detects VSCode
Additional Context
- The
codecommand works fine when run directly in the same VSCode integrated terminal - The VSCode extension is properly installed and functional
- This appears to be a regression - similar issue was reported in #3492 (for version 1.0.51) but marked as closed
- The IDE lock file at
~/.claude/ide/*.lockshows correct VSCode detection when connected from external terminal
Diagnostic Info
From /status in VSCode integrated terminal:
IDE: ✘ Error installing VS Code extension: 1: 1 'code' is not recognized as an internal or external command,
operable program or batch file.
Please restart your IDE and try again.
From external terminal (working):
IDE lock file content:
{"pid":12484,"workspaceFolders":["c:\Users\..."],"ideName":"Visual Studio Code","transport":"ws","runningInWindows":true,"authToken":"..."}
🤖 Generated with Claude Code
This issue has 11 comments on GitHub. Read the full discussion on GitHub ↗