If Claude Code or the Claude extension won’t start in VS Code, the fix is usually one of a handful of things: your Node.js version is too old, the extension isn’t installed correctly, or the integrated terminal can’t find the claude command. This article walks through the most common causes and gives step-by-step fixes that work on Windows, macOS, and Linux.
Why Claude Won’t Launch in VS Code
Claude Code is a command-line tool that runs inside your terminal. When you install it through the VS Code extension, the extension essentially opens a terminal and runs the claude command. If that command isn’t found, or if the terminal environment is broken, you’ll see an error instead of the Claude interface. The same applies if you’re trying to run it manually in the integrated terminal.
There are three main layers where things go wrong:
- Installation layer – the extension or the CLI itself isn’t installed properly.
- Environment layer – Node.js is missing or outdated, or the PATH doesn’t include the global npm directory.
- VS Code layer – the integrated terminal isn’t picking up your shell profile, or the extension needs a restart.
Most errors fall into one of these three, so working through them in order will resolve the vast majority of cases.
Check Your Node.js Version First
Claude Code requires Node.js 18 or newer. If you have an older version, the CLI won’t run at all. To check your version, open a terminal (any terminal, not just VS Code) and run:
node --version
If it prints something like v16.14.0, that’s too old. If it prints v20.11.0 or higher, you’re fine. If you get command not found, Node.js isn’t installed.
To install or upgrade Node.js, the easiest method is to download the LTS version from the official Node.js website. On macOS, you can also use Homebrew with brew install node. On Linux, your package manager likely has it, but the version may be old – consider using nvm (Node Version Manager) to get a recent one.
After upgrading, restart VS Code completely (not just the terminal) and try again.
Verify the Claude CLI Is Installed
Even if the extension is installed, the underlying claude command must be available on your system. The extension doesn’t bundle the CLI – it calls it from your PATH. To check, run this in your terminal:
claude --version
If you see a version number, the CLI is installed. If you get command not found, you need to install it. The official method is:
npm install -g @anthropic-ai/claude-code
This installs the CLI globally. After that, close and reopen VS Code. If the command still isn’t found, the global npm directory isn’t in your PATH – see the next section.
Fix PATH Issues for the Claude Command
On many systems, especially macOS and Linux, npm installs global packages to a directory that isn’t in the default PATH. This is a very common cause of “claude: command not foundâ€� inside VS Code even though it works in your regular terminal.
To find where npm puts global packages, run:
npm config get prefix
On macOS and Linux, this is usually /usr/local or /Users/yourname/.npm-global. On Windows, it’s typically %APPDATA%\npm.
Once you know the prefix, add the bin directory (or on Windows, the prefix itself) to your PATH. The exact steps depend on your shell:
- bash/zsh (macOS/Linux): add
export PATH="$PATH:$(npm config get prefix)/bin"to your.bashrcor.zshrc. - PowerShell (Windows): add
%APPDATA%\npmto your user PATH via System Properties → Environment Variables. - Command Prompt (Windows): same as PowerShell, add the npm directory to the PATH.
After updating PATH, restart VS Code. The integrated terminal should now find the claude command.
Reinstall the VS Code Extension
Sometimes the extension itself is corrupted or not fully installed. This often happens after a VS Code update. To reinstall:
- Open the Extensions view (Ctrl+Shift+X on Windows/Linux, Cmd+Shift+X on macOS).
- Search for “Claude� and find the official Anthropic extension.
- Click the gear icon and select “Uninstall�.
- Restart VS Code.
- Reinstall the extension from the marketplace.
If you’re using a pre-release version, switch to the stable release – pre-release builds can have bugs that break the integration.
Restart the Integrated Terminal and VS Code
This sounds trivial, but it fixes more issues than you’d expect. The integrated terminal caches the environment variables from when the window opened. If you installed Node.js or the CLI after VS Code was already running, the terminal won’t see the new PATH entries.
First, try just killing the terminal: click the trash can icon in the terminal panel, then open a new one. If that doesn’t work, fully quit VS Code (not just close the window) and relaunch it. On Windows, make sure it’s not still running in the system tray.
Check for Proxy or Network Restrictions
Claude Code needs to reach Anthropic’s API. If you’re behind a corporate proxy or have strict firewall rules, the CLI may fail to authenticate or respond. Symptoms include timeouts, “connection refusedâ€�, or the CLI hanging indefinitely.
If you use a proxy, set the environment variables in your shell profile:
export HTTP_PROXY="http://proxy.example.com:8080"
export HTTPS_PROXY="http://proxy.example.com:8080"
On Windows PowerShell:
$env:HTTP_PROXY = "http://proxy.example.com:8080"
$env:HTTPS_PROXY = "http://proxy.example.com:8080"
Also check if your network blocks WebSocket connections, which Claude Code uses for streaming responses. If you can open the Anthropic website in your browser but the CLI fails, this is likely the issue.
Frequently Asked Questions
Why does Claude work in my regular terminal but not in VS Code?
This almost always means VS Code’s integrated terminal isn’t loading your shell profile. VS Code launches the terminal with a clean environment, so if you added the PATH in .bashrc or .zshrc, it should load – but if you added it to .profile or .bash_profile, it may not. Move the PATH export to .bashrc or .zshrc, or set the terminal.integrated.shellArgs setting to force login shell mode.
What if I get “EACCES: permission denied� when installing the CLI?
This means npm doesn’t have write access to its global directory. On macOS/Linux, don’t use sudo – instead, change npm’s default directory to one you own. Run npm config set prefix '~/.npm-global', then add ~/.npm-global/bin to your PATH. On Windows, run the terminal as Administrator once to install.
Can I use Claude Code without the VS Code extension?
Yes. The CLI works in any terminal. Just open your project folder in a terminal and run claude. The VS Code extension is a convenience wrapper – it doesn’t add functionality that the CLI doesn’t have. If the extension keeps failing, using the CLI directly is a reliable workaround.
Why does the extension say “Claude Code is not installed� even though I installed it?
The extension checks for the claude command in your PATH. If it’s not there, it shows that message. Follow the PATH fix steps above. Also, make sure you installed the CLI globally (npm install -g) and not just locally in a project folder.
Does VS Code need to be restarted after installing Node.js?
Yes. VS Code captures the environment variables when it starts. If you install Node.js or update PATH while VS Code is running, the integrated terminal won’t see the changes until you restart the entire application, not just the terminal window.
What if I’m using WSL on Windows?
If you’re in WSL, install Node.js and the CLI inside the WSL distribution, not on the Windows side. The VS Code extension for WSL (Remote – WSL) will then run the terminal inside WSL, and it will find the Linux version of claude. Mixing Windows and WSL installations is a common source of confusion.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Blockchain vs Database: When Does Distributed Trust Win?
- GTA 6 and Call of Duty on Same Console?
- MCP in Production: Security Failures Behind the Backdoor Label
- Nothing Phone 2 Waterproof? IP54 Rating Explained
- Satellite Internet Equipment & Installation Guide
- Infinix GT 20 Pro vs AI Nova 2 Ultra 5G: Which Fits?