Skip to content
InnovateTechie
Claude Code

Claude Code VS Code Extension: Setup and Workflow

InnovateTechieBy InnovateTechie10 min read
Share
Claude Code VS Code Extension: Setup and Workflow

Part ofWhat Is Claude Code? The Complete Guide

Claude Code VS Code extension guide: install from the marketplace, delegate from the sidebar, review inline diffs — and when the CLI wins.

The Claude Code VS Code extension puts Anthropic's coding agent inside your editor: a sidebar chat panel, inline diff review before any file changes, @-mentions with line ranges, and editable plans. Install it from the VS Code Marketplace, sign in with a paid Claude plan (Pro or higher) or a Console account, and delegate work without leaving the editor.

That's the short answer. Here's the longer one, from experience: we run this site with Claude Code daily — the terminal CLI for long autonomous runs, the extension whenever we want to watch every edit land in a real diff viewer. New to the agent itself? Start with our pillar guide, What Is Claude Code?, then come back for the editor setup.

What the Claude Code VS Code extension adds over the CLI

The terminal CLI is Claude Code — the extension doesn't replace it. It wraps the same engine, the same models, and the same configuration in a native panel, then adds the visual layer a terminal can't offer. Anthropic's official VS Code documentation now calls it the recommended way to run Claude Code in VS Code, and five features earn that label:

  1. A sidebar agent panel. Chat with the agent in a dockable panel — drag it to the secondary sidebar, the left sidebar, or open it as an editor tab. Multiple conversations run in parallel tabs, each with its own context and history.
  2. Inline diff review. When Claude wants to edit a file, the extension opens a side-by-side comparison before anything touches disk. Accept, reject, or edit the proposal directly in the diff view — the extension tells Claude when you've modified it, so it never assumes the file matches its original suggestion.
  3. Plans you can annotate. In Plan mode, the extension opens Claude's plan as a full markdown document. Add inline comments on the parts you'd do differently before the agent writes a single line.
  4. Editor context for free. Claude automatically sees your selected text — the prompt box footer counts the highlighted lines. Press Alt+K (Option+K on Mac) to drop an @-mention like @auth.ts#5-10 straight into your prompt.
  5. Searchable session history. Every conversation gets an AI-generated title and resumes with full history. A Remote tab even pulls in cloud sessions you started on claude.ai.

One detail trips up nearly everyone: the extension bundles its own private copy of the CLI for the chat panel, but it does not put claude on your PATH. To run the CLI in the integrated terminal, install it separately.

Claude Code VS Code extension workflow — prompt in the sidebar agent panel, review the inline diff in the editor

Installing the Claude Code extension in VS Code

Setting up the extension took us under two minutes:

  1. Check your editor version. The extension needs VS Code 1.98.0 or higher (Help → About).
  2. Install from the marketplace. Open the Extensions view with Ctrl+Shift+X (Cmd+Shift+X on Mac), search "Claude Code", and install the Anthropic-published listing — the same one hosted on the Visual Studio Marketplace. Guides interchangeably call it the Claude Code VSCode extension; either way, don't confuse it with "Claude Dev," a community project now named Cline.
  3. Open the panel. Click the Spark icon in the editor toolbar — it appears once a file is open — or hit the Command Palette (Ctrl+Shift+P) and type "Claude Code".
  4. Sign in. A browser window handles authorization. Any paid Claude subscription works: Pro at $20/month, Max at $100 or $200/month, Team, or Enterprise. A Claude Console account works too, and you don't need an API key. The Free plan does not include Claude Code, full stop.

If the Spark icon doesn't show after installing, run "Developer: Reload Window" from the Command Palette — in our experience that fixes it nine times out of ten.

The core workflow: delegate, review, steer

Running Claude Code in VS Code settles into a three-beat loop once the panel is docked.

Delegate in Plan mode. Click the mode indicator at the bottom of the prompt box and switch to Plan. Describe the task — "add rate limiting to the contact form API" — and Claude researches the codebase, then hands back a plan as an editable document. Comment, adjust, approve.

Review every diff. With default permissions, Claude asks before each edit, and the change opens in VS Code's native diff viewer. This is the extension's single biggest win over the terminal: you read green and red lines in the editor you already trust instead of a re-printed patch in the scrollback. We reject maybe one diff in ten, and every rejection carries a note telling Claude what to do instead.

Steer with context. Highlight the exact lines you're discussing before prompting — the selection travels with the message. Reference command output with @terminal:name rather than pasting logs. And when a session goes sideways, hover over an earlier message and use checkpoints to rewind the code, fork the conversation, or both at once.

Four shortcuts carry most of our VS Code Claude Code workflow:

Shortcut (Windows/Linux)MacWhat it does
Ctrl+EscCmd+EscToggle focus between the editor and the Claude panel
Ctrl+Shift+EscCmd+Shift+EscOpen a new conversation as an editor tab
Alt+KOption+KInsert an @-mention for the current file and selection
Shift+EnterShift+EnterNew line in the prompt box without sending

Claude Code VS Code extension compared with the terminal CLI and the desktop app — where each interface fits

Claude Code VS Code extension vs CLI vs desktop app

Same agent, three front ends. Here's how we split our own time between them:

VS Code extensionTerminal CLIDesktop app
InterfaceSidebar panel + native diff viewerText UI in any terminalStandalone app, parallel sessions
Best forReviewing every change visuallyScripting, SSH, automation, the full command setRunning several local and cloud agents at once
Commands & skillsSubset (type / to see)All of themSubset
Unique extrasPlan annotation, selection context, checkpoint buttons! bash shortcut, tab completion, headless modeCloud session hand-off
SetupMarketplace installnpm or native installerDownload from Anthropic

The CLI remains the superset — every command, hook, and flag ships there first, and our Claude Code CLI documentation guide maps that surface. The Claude Code desktop app sits at the other end: less depth per session, more sessions at once. The extension is the middle path, and nothing is siloed — run claude --resume in a terminal to continue any conversation the extension started, because both read the same history, the same CLAUDE.md, the same hooks, and the same MCP servers.

Yes, it works in Cursor and other VS Code forks

Anthropic ships a one-click install path for Cursor, and the Claude Code VS Code extension also loads in forks like Devin Desktop and Kiro — search the fork's Extensions view or pull it from the Open VSX registry. We keep it installed inside Cursor on one machine: Cursor's own agent and Claude Code coexist without conflict, and comparing them side by side is exactly how we wrote Cursor vs Claude Code. If a fork refuses the extension outright, the fallback never fails: open that editor's integrated terminal and run the CLI there.

Settings worth changing on day one

The defaults are sensible, but a few edits made the Claude Code VS Code extension ours — all under Extensions → Claude Code in VS Code settings:

SettingDefaultOur take
initialPermissionModedefaultSet to plan so every new conversation starts with a reviewed plan before edits
enableNewConversationShortcutfalseTurn on — Ctrl+N then starts a fresh conversation when the panel is focused
useTerminalfalseLeave off; the graphical panel is the point. Flip it only if you want the CLI look inside a panel
autosavetrueLeave on — files save before Claude reads them, so it never works from stale buffers
respectGitIgnoretrueLeave on — keeps node_modules and build output out of file searches

Two more habits worth stealing. First, keep shared configuration in ~/.claude/settings.json, not in VS Code settings — the extension and CLI both read it, so permissions and hooks stay identical across surfaces. Second, resist bypassPermissions outside a sandbox; the diff-review step is the reason to use the extension at all.

Claude pricing at a glance

PlanPrice
Free$0
Pro$20 / month
Maxfrom $100 / month
APIPay per token

For the full breakdown of every plan, see our how much Claude costs guide.

Frequently Asked Questions

VS Code is Microsoft's free code editor. Claude Code is Anthropic's agentic coding tool — an AI agent that reads, edits, and tests code on instruction. They're complementary, not competing: the Claude Code VS Code extension runs Anthropic's agent inside Microsoft's editor, so you prompt in a panel and review diffs in place.

Same engine, same models, same configuration. The extension reads your CLAUDE.md, hooks, MCP servers, and skills exactly as the terminal version does, and the two share conversation history. The difference is the wrapper: the extension knows your cursor position and renders diffs natively, while a few commands remain CLI-only.

The extension costs nothing to install, but it does nothing without a paid Anthropic account. Claude Code requires Pro ($20/month), Max ($100 or $200/month), Team, Enterprise, or a Console account with API credits — the Free plan doesn't include it. [Is Claude Code Free?](/is-claude-code-free) breaks down every option.

No — Claude Code is terminal-first and runs in any shell, including VS Code's integrated terminal, iTerm2, or plain Windows Terminal. The extension is optional. It adds a graphical panel, inline diff review, and clickable session history on top of the same agent. Terminal devotees lose nothing by skipping it.

Yes. Anthropic publishes an install path for Cursor directly, and the extension also installs in forks such as Devin Desktop and Kiro through the editor's Extensions view or the Open VSX registry. If a fork can't load it, run the CLI in that editor's integrated terminal instead — the CLI works anywhere.

Yes — the extension and CLI share one conversation history. Run claude --resume in any terminal and pick the session from the interactive list; the full message history carries over. The reverse works too: the extension's Session history button lists conversations you originally started in the terminal.

VS Code 1.98.0 or higher. If it installs but the Spark icon never appears, open a file first (the toolbar icon needs an active file), run "Developer: Reload Window," confirm the workspace isn't in Restricted Mode, and temporarily disable competing AI extensions like Cline or Continue while you test.
InnovateTechie

Written by

InnovateTechie

Writing about Claude and the Anthropic toolkit — models, Claude Code, pricing, features, and fixes, in clear, practical, hands-on guides tested by daily use.

View all posts →