· Last tested 2026-04-22

Fix Claude Code Not Working in VS Code

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


Written by Michael — solo dev, Da Nang, Vietnam. 50K+ Chrome extension users. $500K+ on Upwork (100% Job Success). Runs 5 Claude Max subs in parallel. Built this site with autonomous agent fleets. See what I'm building


Without a CLAUDE.md — what actually happens:

You type: "Add auth to my Next.js app"

Claude generates: pages/api/auth/[...nextauth].js — wrong directory (you're on App Router), wrong file extension (you use TypeScript), wrong NextAuth version (v4 patterns, you need v5), session handling that doesn't match your middleware setup.

You spend 40 minutes reverting and rewriting. Claude was "helpful."

With the Zovo Lifetime CLAUDE.md:

Same prompt. Claude reads 300 lines of context about YOUR project. Generates: app/api/auth/[...nextauth]/route.ts with v5 patterns, your session types, your middleware config, your test patterns.

Works on first run. You commit and move on.

That's the difference a $99 file makes.

Get the CLAUDE.md for your stack

I hit this exact error six months ago. Then I wrote a CLAUDE.md that tells Claude my stack, my conventions, and my error handling patterns. Haven't seen it since.

I run 5 Claude Max subs, 16 Chrome extensions serving 50K users, and bill $500K+ on Upwork. These CLAUDE.md templates are what I actually use. Not theory — production configs.

Grab the templates — $99 once, free forever

47/500 founding spots. Price goes up when they're gone.

Related Issues


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

Try it: Paste your error into our Error Diagnostic for an instant fix.


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

Related Articles

→ Try the Error Diagnostic Tool — paste your error message, get the fix instantly