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:
- The Claude Code panel is blank or shows "connecting..."
- Commands typed in the panel produce no response
- The extension icon appears but clicking it does nothing
- Error: "Claude Code CLI not found"
Why This Happens
The VS Code extension is a thin wrapper around the Claude Code CLI. It fails when:
- The CLI is not installed or not on VS Code's PATH
- VS Code is using a different shell profile than your terminal
- The extension version is incompatible with the installed CLI version
- WSL remote sessions have different PATH/environment than the host
- Another extension is conflicting
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
- Open VS Code Command Palette (Cmd+Shift+P / Ctrl+Shift+P)
- Type "Output: Focus on Output View"
- In the output panel dropdown, select "Claude Code"
- Look for error messages
Common errors:
- "ENOENT: claude not found" — CLI not on PATH (see Step 1)
- "Authentication required" — Run
claude /loginin the integrated terminal - "Connection refused" — Extension cannot communicate with CLI process
Step 3 — Restart the Extension
- Open Command Palette (Cmd+Shift+P / Ctrl+Shift+P)
- Type "Developer: Restart Extension Host"
- 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:
- Open the Claude Code panel
- Type a simple query: "What is 2+2?"
- 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
- Keep CLI and extension in sync: Update both together with
npm update -g @anthropic-ai/claude-codeand VS Code extension auto-update. - Use
ANTHROPIC_API_KEYin WSL: Browser-based OAuth is unreliable in WSL; environment variable auth is more stable.
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.
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
- Install Claude Code — All Platforms Guide — Fresh installation instructions
- Fix Claude Code Login — Cannot Paste Auth Code — Authentication issues
- Claude Code Docker Desktop Workflow Tips — Browse all IDE guides
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
- Why Is Claude Code Producing Code That — Developer Guide
- Fix Claude Code Uncaught Typeerror Is Not A — Quick Guide
- Claude Code Not Recognizing TypeScript — Developer Guide
- Why Is Claude Code Changing Files I Did — Developer Guide
- Fix Claude Md Not Being Read By Claude Code — Quick Guide
- Fix Claude Code Not Generating Tests — Quick Guide (2026)
- Fix Claude Code Crashing in VS Code
- Fix Claude Code Not Working in VS Code