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

Claude Code in VS Code can fail silently due to PATH issues, authentication problems, or extension conflicts. This guide walks through every known fix so you can get Claude Code running in your editor within minutes.

The Problem

You installed Claude Code but nothing happens when you try to use it in VS Code. The extension panel may show errors, the Claude Code terminal may fail to spawn, or commands simply hang with no output. This is one of the most common issues developers hit when setting up Claude Code for the first time.

Quick Solution

Step 1: Verify Claude Code CLI works outside VS Code

claude --version

If this fails, install or update Claude Code:

npm install -g @anthropic-ai/claude-code

Step 2: Check your VS Code terminal PATH

Open the VS Code integrated terminal and run:

which claude

If claude is not found, your VS Code terminal does not inherit your shell PATH. Fix this by opening VS Code from the terminal:

code .

Or set the PATH explicitly in VS Code settings (settings.json):

{
  "terminal.integrated.env.osx": {
    "PATH": "/usr/local/bin:/opt/homebrew/bin:${env:PATH}"
  }
}

Step 3: Re-authenticate

claude auth login

Follow the browser prompt. Once authenticated, restart VS Code completely (Cmd+Q / Ctrl+Q, then reopen).

Step 4: Check for extension conflicts

Disable other AI extensions temporarily (Copilot, Cody, Continue) and reload VS Code. Some extensions compete for the same terminal or language server resources.

Step 5: Reset Claude Code state

rm -rf ~/.claude
claude auth login

This clears cached state and forces a clean setup.

How It Works

Claude Code operates as a CLI tool that VS Code invokes through its integrated terminal. When VS Code launches, it initializes a shell environment that may differ from your regular terminal. Node.js global binaries (where Claude Code lives after npm install -g) must be on the PATH that VS Code’s terminal inherits.

The extension communicates with Anthropic’s API using credentials stored in ~/.claude/. If authentication tokens expire or the config directory gets corrupted, the extension silently fails. Unlike browser-based tools, Claude Code needs a valid CLI installation as its foundation – the VS Code extension is essentially a UI wrapper around the CLI.

Common Issues

“command not found: claude” in VS Code but works in regular terminal This is a PATH mismatch. VS Code launched from Spotlight or the Dock does not inherit your shell profile. Always launch VS Code from terminal with code . or configure terminal.integrated.env in settings.

Extension installed but no Claude Code panel appears Ensure you installed the correct extension: “Claude Code” by Anthropic. Search the Extensions Marketplace (Cmd+Shift+X) for the exact name. After installing, run the command palette (Cmd+Shift+P) and type “Claude” to see available commands.

Claude Code hangs after sending a prompt Check your network and API key. Run claude "hello" in a standalone terminal. If that also hangs, the issue is authentication or network, not VS Code. Corporate proxies may block Anthropic’s API endpoints – configure HTTPS_PROXY if needed.

Example CLAUDE.md Section

# VS Code Project Setup

## Environment
- Editor: VS Code with Claude Code extension
- Node: v20+ (required for Claude Code CLI)
- Package manager: npm

## Project Structure
- /src — application source code
- /tests — test files (Jest)
- /.vscode — editor configuration

## Claude Code Rules
- Always run tests before suggesting changes: `npm test`
- Use the VS Code integrated terminal for all commands
- Check TypeScript errors with: `npx tsc --noEmit`
- Respect .vscode/settings.json formatting rules

## Common Commands
- Build: `npm run build`
- Test: `npm test`
- Lint: `npm run lint`

Best Practices

  1. Launch VS Code from terminal – Run code . from your project directory to ensure PATH inheritance. This eliminates 80% of “not working” issues.

  2. Keep Claude Code CLI updated – Run npm update -g @anthropic-ai/claude-code weekly. Breaking changes between CLI and extension versions cause silent failures.

  3. Use CLAUDE.md in every project – Place a CLAUDE.md file in your project root so Claude Code automatically loads your project context when VS Code opens the folder.

  4. Check the Output panel – In VS Code, open View > Output and select “Claude Code” from the dropdown. Error messages appear here even when the main UI shows nothing.

  5. Set workspace trust – VS Code Workspace Trust can block extensions. If prompted, mark your project folder as trusted.



I'm a solo developer in Vietnam. 50K Chrome extension users. $500K+ on Upwork. 5 Claude Max subscriptions running agent fleets in parallel. These are my actual CLAUDE.md templates, orchestration configs, and prompts. Not a course. Not theory. The files I copy into every project before I write a line of code. **[See what's inside →](https://zovo.one/lifetime?utm_source=ccg&utm_medium=cta-default&utm_campaign=claude-code-not-working-in-vscode)** $99 once. Free forever. 47/500 founding spots left.

Related Reading

Built by theluckystrike. More at zovo.one