Installing Claude Code in VS Code
AI coding agents · updated may 2026
I put off installing Claude Code for longer than I should have because I assumed it would mean giving up my existing VS Code setup — extensions, keybindings, the terminal layout I’ve had muscle memory for since 2021. It doesn’t. It sits inside the editor as an extension and a terminal panel, and everything else stays exactly where it was. Here’s the setup I run on every new machine now, including the parts that aren’t obvious from the marketplace listing.
Installing the extension
Open the Extensions panel in VS Code (Ctrl+Shift+X on Windows/Linux, Cmd+Shift+X on Mac) and search for “Claude Code.” Install the official one from Anthropic — there are a couple of copycat extensions with similar names that just wrap the CLI badly, so check the publisher before you click install.
If you’d rather skip the marketplace entirely, you can install the CLI directly and it’ll register itself with VS Code on first run:
npm install -g @anthropic-ai/claude-code
Either path gets you the same end state: a claude command available in any integrated terminal, plus a sidebar panel if you installed via the marketplace. I use the CLI path on remote dev boxes where I’m SSH’d in without the extension installed locally.
Authenticating
First run prompts you to authenticate, and you’ve got two real options: log in with your Anthropic Console account (usage billed to your API key, pay-as-you-go) or with a Claude subscription (Pro or Max, flat monthly rate). If you’re using Claude Code daily across multiple projects, the subscription tiers work out cheaper almost every time — I switched from API billing to Max after about three weeks and my monthly cost dropped by more than half. Run claude in a terminal, follow the browser login flow, and it’ll cache the session so you’re not re-authenticating per project.
One gotcha: if you’re on a company machine with SSO restrictions, the OAuth redirect can get blocked by a proxy. If the browser flow hangs, kill it and try claude auth login --no-browser, which gives you a code to paste manually instead of relying on the redirect.
Your first prompt
Open a project folder, open the terminal, type claude, and just describe what you want in plain language. Don’t over-engineer your first prompt — I see people writing paragraph-long specs before they’ve even confirmed the tool can see their codebase. Start small: ask it to explain what a file does, or to list the routes in your app. Watch how it reads files before touching anything. That read-first behavior is the thing to build trust in before you hand it anything destructive.
A good first real task is a bug fix with a clear repro step, something like “the login form submits twice when you press Enter, fix it.” Specific, scoped, verifiable. Vague prompts like “improve the code quality” produce vague, sprawling diffs that are harder to review than the problem was to begin with.
Keybindings worth knowing
The defaults are usable but there are a handful I rebind on every install:
Escto interrupt a running response — this one’s default and it matters more than people expect, because letting a bad response run to completion wastes both time and context.- A dedicated shortcut to open a new Claude Code terminal tab, since the default requires going through the command palette. I bind mine to
Ctrl+Alt+C. - Shift+Tab to cycle between plan mode and normal mode, which I use constantly when I want it to think through an approach before writing anything.
None of this is required to get value out of the tool, but if you’re going to use it daily, five minutes of keybinding setup saves you a lot of command-palette digging later.
Common gotchas
A few things that tripped me up early on. The tool won’t see files outside your open workspace folder by default, so if you’re referencing a sibling repo or a shared config elsewhere on disk, you need to open that as an additional workspace folder or point to it with an absolute path in your prompt.
Large monorepos can also blow through context faster than you’d think if you let the agent explore too broadly — if it starts reading dozens of files for a task that should touch three, interrupt it and narrow the ask. And if permission prompts start appearing for actions you’ve already approved, check whether you’re running from a different working directory than last time; approvals are often scoped per-directory, not globally, which trips people up when they move a project.
Once it’s installed and authenticated, the actual workflow is less about the tool and more about how you write prompts — that’s worth its own read once you’re past setup.
builder, codelabs.com.au
Stay up to date with AI coding
New articles roughly every couple of weeks. No spam, unsubscribe any time.