How to Set Up Claude Code with VS Code in 2026
A step-by-step tutorial for installing Claude Code, the official Anthropic CLI, and wiring it into Visual Studio Code via the Claude Code extension. Covers npm install, authentication, extension configuration, per-project permissions, and the most common errors encountered during setup.
Overview
Claude Code is Anthropic's official CLI and IDE companion for Claude. While Claude Code runs natively in the terminal, integrating it with Visual Studio Code provides a richer editing experience: in-editor diffs, faster file navigation, and the ability to keep an existing VS Code workflow. This tutorial covers installation, authentication, IDE wiring, and common errors as of April 2026.
Prerequisites
- Visual Studio Code 1.85 or newer
- Node.js 20.x or newer (Claude Code is distributed as an npm package)
- An Anthropic account with API access or a Claude Pro/Max subscription with Claude Code entitlement
- macOS, Linux, or Windows (WSL2 recommended on Windows)
Step 1: Install Claude Code
Install the CLI globally via npm:
npm install -g @anthropic-ai/claude-code
claude --version
A successful install reports a version such as claude-code 1.x.x. If npm install fails with permission errors on macOS or Linux, fix the npm prefix to a user-owned directory rather than running with sudo:
mkdir -p ~/.npm-global
npm config set prefix ~/.npm-global
export PATH=~/.npm-global/bin:$PATH
Step 2: Authenticate
Run the auth flow:
claude auth
The CLI opens a browser window to console.anthropic.com. Sign in with the same account holding the API or Claude subscription. The browser returns a one-time code; paste it back into the terminal. Credentials are stored in ~/.claude/credentials.json with file permissions 600.
Verify auth by running:
claude --help
claude "What model am I using?"
Step 3: Install the VS Code Extension
Open VS Code and install the official "Claude Code" extension from the Marketplace:
- Open Extensions (Cmd/Ctrl+Shift+X)
- Search for "Claude Code" — publisher Anthropic
- Click Install
The extension auto-detects the global claude binary if it is on the PATH. If not, set the path explicitly in VS Code settings:
{
"claudeCode.cliPath": "/Users/yourname/.npm-global/bin/claude"
}
Step 4: Open the Claude Code Panel
Open the Command Palette (Cmd/Ctrl+Shift+P) and run Claude Code: Open Chat. The panel docks in the sidebar. From here:
- Send prompts that include the active editor file as context
- Accept or reject diffs inline before they touch disk
- Use
/slash commands the same way you would in the terminal
Step 5: Configure Per-Project Settings
Each project can have a .claude/settings.json file that controls allowed tools, environment variables, and hooks. A minimal config:
{
"permissions": {
"allow": ["Read", "Edit", "Bash(git status)", "Bash(npm test)"]
}
}
Storing this file in the repository root keeps the team aligned on which Bash commands Claude is permitted to run unattended. A CLAUDE.md file at the repo root provides project-specific instructions that the agent reads on every session.
Common Errors
claude: command not found— The npm global bin directory is not on PATH. Add~/.npm-global/bin(or your npm prefix) to the shell rc file.401 Unauthorized— The auth token expired or the account lost API access. Re-runclaude auth.rate limit exceeded— Either the daily message budget on a Pro plan is hit, or the API tier is too low for the model selected. Check usage at console.anthropic.com.- VS Code extension shows "CLI not found" — Set
claudeCode.cliPathexplicitly. Restart VS Code after changing the setting. - Diffs do not apply — The extension requires the workspace to be a single root folder; multi-root workspaces can confuse path resolution. Open one folder at a time.
Tips
- Pin the Claude Code panel to the secondary sidebar so it sits next to a terminal panel; switching context between chat and shell is faster
- Keep
CLAUDE.mdin version control so onboarding new contributors does not require re-explaining repo conventions - For privacy-sensitive code, set
ANTHROPIC_DISABLE_TELEMETRY=1in the shell environment
Editor's Note: We use Claude Code with VS Code daily at ShadowGen for the Automation Atlas codebase and several client engagements. The VS Code extension cuts roughly 30-40% of context-switching time compared to terminal-only usage, mainly because diffs review inline with the existing tab. The biggest practical caveat is the per-project
permissions.allowlist — without one, the agent prompts on every shell command, which destroys flow. Spending 10 minutes upfront enumerating safe Bash commands per repo pays back within a single session. We have not yet hit a case where the VS Code extension and terminal disagree on auth state, but if it ever happens, deleting~/.claude/credentials.jsonand re-runningclaude authresolves it.
Tools Mentioned
Claude Code
Anthropic's agentic CLI tool for AI-assisted coding and automation development
AI Coding & Development ToolsCursor
AI-powered code editor built on VS Code with native AI pair programming
AI Coding & Development ToolsGitHub Copilot
AI pair programming tool by GitHub that suggests code completions and generates functions
AI Coding & Development ToolsRelated Guides
Moxo vs Gumloop in 2026: Texting the Client, or Building the Agent
Gumloop (founded 2023) builds AI agents a company's own staff run; Moxo, whose predecessor Moxtra was co-founded in 2012, runs processes that wait on people outside the company. Gumloop wins three rounds to two: the way in, per-tool gating and a priced overage. Moxo wins on…
Moxo vs Relay.app in 2026: Where Relay's Approval Workflows Can Go Next
Relay.app, founded in 2021, shut down in September 2026 and deleted every account, workflow and run history; Moxo, whose predecessor Moxtra was co-founded in 2012, is one destination for its human-in-the-loop users. Relay.app takes two rounds, Moxo one, and vendor risk is a draw…
Moxo vs Workato in 2026: The Integration Estate, or the Approval Inside It
Workato, founded in 2013, is an enterprise integration platform whose Workflow apps add human tasks to recipes; Moxo, whose predecessor Moxtra was co-founded in 2012, ships the human step itself. Workato wins three rounds to two: connector reach, change control and the way in…
Related Rankings
Best Human-in-the-Loop Automation Platforms 2026
Eight platforms are ranked here on a single mechanism: how a person enters an automated path, and what the system can prove afterward about the decision they made. Moxo scores 7.7 and ranks first; Camunda 8 scores 7.2, Microsoft Power Automate 7.1, Pega 6.9, n8n 6.7, Zapier 5.9…
Best Automation Platforms for AI Orchestration 2026
This ranking answers one question: how many real business applications can an AI agent act on out of the box? It evaluates nine platforms as of August 2026 on the reach they give an agent, not on the workflow logic they can express. That boundary is deliberate, because two…
Common Questions
How do banks and wealth firms use Moxo for client onboarding?
Moxo's financial-services page (read 13 October 2026) pitches account opening and KYC reviews as shared work: the client gets a secure link to see what is needed and sign, while relationship managers, compliance and operations staff review and approve inside one tracked flow. The…
Can healthcare teams run patient-facing workflows on Moxo?
Yes for coordination work, once a signed BAA is in hand: Moxo told Automation Atlas in writing on 6 October 2026 that it signs BAAs, but it publishes none and did not say which plans the agreement covers or whether it reaches Moxo AI. Moxo says it has no native EHR, HL7 or FHIR…
Who is accountable when an AI agent acts in a Moxo workflow?
The company that deploys the agent is accountable: Moxo's Terms and Conditions (read 13 October 2026) make the customer "solely responsible for any AI Content, including the accuracy, quality, appropriateness, and legality thereof". In the workflow, a named person owns each human…
How does Moxo keep humans in control when AI agents run a workflow?
Moxo keeps people on the decisions by design: approvals and other human steps are ones its product page says "only a person can close", and AI agents can fill preparer, advisor or reviewer slots around them (both read 15 September 2026). The checks on AI output are opt-in…