Fix Claude Code Not Working in VS Code

Written by Michael Lip · Solo founder of Zovo · $400K+ on Upwork · 100% JSS Join 50+ builders · More at zovo.one

TL;DR: Verify the CLI is installed and on PATH, check the extension version, restart VS Code, and inspect the output channel for errors.

The Problem

Claude Code is installed but not working in VS Code. Symptoms include:

Why This Happens

The VS Code extension is a thin wrapper around the Claude Code CLI. It fails when:

The Fix

Step 1 — Verify the CLI Is Installed and on PATH

Open VS Code’s integrated terminal (Ctrl+`) and run:

which claude
claude --version

If which claude returns nothing, the CLI is not on VS Code’s PATH. Fix it:

# Find where claude is installed
npm list -g @anthropic-ai/claude-code

# Common location
ls ~/.npm-global/bin/claude 2>/dev/null || ls /usr/local/bin/claude 2>/dev/null

# Add to VS Code's PATH - edit your shell profile
echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.zshrc

Then restart VS Code completely (not just reload window).

Step 2 — Check the Extension Output Channel

  1. Open VS Code Command Palette (Cmd+Shift+P / Ctrl+Shift+P)
  2. Type “Output: Focus on Output View”
  3. In the output panel dropdown, select “Claude Code”
  4. Look for error messages

Common errors:

Step 3 — Restart the Extension

  1. Open Command Palette (Cmd+Shift+P / Ctrl+Shift+P)
  2. Type “Developer: Restart Extension Host”
  3. Wait for extensions to reload

If that does not work, fully quit and reopen VS Code.

Step 4 — WSL-Specific Fix

If you are using VS Code Remote — WSL:

# Inside WSL terminal in VS Code
# Install Claude Code in WSL, not just on Windows
npm install -g @anthropic-ai/claude-code

# Authenticate inside WSL
export ANTHROPIC_API_KEY="sk-ant-api03-your-key-here"
# Or run: claude /login

# Verify
claude --version

The extension in WSL mode uses the WSL environment, not the Windows host.

Step 5 — Verify It Works

After fixes, test in VS Code:

  1. Open the Claude Code panel
  2. Type a simple query: “What is 2+2?”
  3. Verify you get a response

Expected behavior: Claude responds within a few seconds with the answer.

Common Variations

Scenario Cause Quick Fix
Works in terminal, not in VS Code Different PATH Add npm bin dir to VS Code terminal profile
Works on first open, fails later Extension crash Restart Extension Host
WSL: extension hangs CLI not installed in WSL Install CLI inside WSL
Input corrupts (Cyrillic chars) Encoding bug (Windows) Update extension, use CLI directly
Panel shows 1M context limit Large project indexing Exclude node_modules from workspace
Cursor IDE: not working Different extension API Claude Code may need Cursor-specific build

Prevention


If you debug browser extensions alongside VS Code work, Zovo’s developer tools streamline the inspect-reload-test cycle for Chrome extensions.


Last verified: 2026-04-14. Found an issue? Open a GitHub issue.