How To Setup Claude Code in VS Code: Full Guide

/ Connect, configure, and start coding faster.

Published: July 13, 2026 at 2:00 PM EDT | Updated: July 14, 2026 at 11:48 AM EDT
install claude code in vs code
Image: Stephanie Smith / TheTweaks, Claude

Quick Verdict: To use Claude Code in VS Code, install the official “Claude Code” extension from Extensions view (Ctrl+Shift+X), log in with any paid Claude subscription or Console account and click on Spark icon in the editor’s toolbar to open the panel. You do not need an API key to use the extension. You may also run claude in VS Code’s integrated terminal if you prefer the CLI to the graphical panel.

Testing note: we installed and used the VS Code extension for Claude Code in VS Code 1.9x with Windows 11 and macOS Sonoma in July 2026. All the steps, shortcuts and errors below come from our own experience in setting up and using the extension and checking the official Anthropic documentation.

Key Points

  • Claude Code VS Code extension is the same underlying Claude Code engine, just presented differently
  • You do not need an API key – any paid Claude subscription or Console account will suffice
  • Installing the extension does not put claude in the terminal PATH – you still need the standalone CLI for terminal usage
  • The extension presents every file change as side-by-side diff before applying it to your code
  • If you are using an external terminal, run /ide to manually link it with VS Code

Are you using Claude Code in your editor exclusively through a terminal? Then you should know that there is a really useful upgrade. In this guide, we will go over the setup process, its real capabilities and errors we encountered while testing the extension.

What Is Claude Code in VS Code

Claude Code in VS Code is not another product, just a graphical wrapper around Claude Code agent that works through the terminal the same models, CLAUDE.md project memory, the same permission system. Only the way the interaction happens changes instead of getting text output in the terminal, you get the visual diffs, clickable file references and a chat-like panel inside your editor.

There are two ways to use Claude Code in VS Code: the graphical extension panel and the CLI running in the VS Code terminal. Most likely, you will be using both depending on your specific tasks.

Install Claude Code

Before being able to run claude in the terminal, you need to install the standalone CLI for it. If you haven’t done this yet:

Powershell

irm https://claude.ai/install.ps1 | iex

Check whether it installed successfully:

Powershell

claude -v

If you have already installed Claude Code according to our full guide on installation, then you may jump ahead to connecting it with VS Code.

How To Install Claude Code In VS Code

Installing the Extension

Open VS Code and press Cmd+Shift+X (Mac) or Ctrl+Shift+X (Windows/Linux) to open the Extensions view. Find and install the “Claude Code” extension published by Anthropic.

Claude code Extension In VS Code
Image: Claude code Extension In VS Code / TheTweaks

The extension works in VS Code forks, such as Cursor, Devin Desktop and Kiro. If your editor does not have native support for the extension, you may still find it in the Open VSX registry.

Note that the extension sometimes does not appear immediately after the installation. To fix it, restart VS Code or run “Developer: Reload Window” from the Command Palette. This fixed the issue for us on one of our test machines.

How to install claude code in VS Code
Image: TheTweaks

Signing In

When opening the panel for the first time, a screen for signing in will appear. Click Sign in and finish authentication in your browser. You will need either:

Claude Pro, Max, Team or Enterprise subscription (any paid subscription)

Claude code in VS Code
Image: TheTweaks

A Claude Console (API) account

You do not need an API key for the usual sign-in process. However, if you have ANTHROPIC_API_KEY set in your shell and still see the sign-in prompt, you may launch VS Code from a terminal with code . command, so that it inherits your shell’s environment.

Connecting the CLI to VS Code

Installing the extension does not add claude to the terminal PATH. You can use the CLI version in the integrated VS Code terminal by opening it with  (Ctrl+` or Cmd+`) shortcut and typing claude. It will detect VS Code and integrate with it automatically for diff viewing and diagnostics.

If you are using an external terminal, run the following inside your Claude Code session to manually connect it with VS Code:

/ide

This command solves the problem of non-integration with VS Code that we have seen most frequently among errors.

First Project

Open a project in VS Code and click the Spark icon in the top right corner of the editor to open the Claude Code panel. Note that the Spark icon appears only if there is an opened file. If you have an empty folder open, the icon will not appear. In that case, use the Status Bar icon (right bottom, labeled “✱ Claude Code”) instead.

Type in the prompt like:

“Explain what this project does”

Claude reads your files and responds in the panel, and every proposed change will be shown in the diff before it happens to your code.

VS Code Features

Prompt Box and Permission Modes

The prompt box allows three permission modes, switchable from the mode indicator at the bottom:

Mode What it does
Manual Ask for permission before every edit 
Plan Show the plan first
Edit automatically Makes changes without asking

We were using the Manual mode for the first week of testing, as it is the safest by default.

@-Mentions and File References

You may use @-mentions to provide more context:

Explain the logic in @auth

Thanks to fuzzy matching, the incomplete names work – @auth mentions auth.js or AuthService.ts file. Append a slash to the name to mention a folder (@src/components/). Use Option+K / Alt+K shortcut to insert reference to your current selection with exact line numbers like @app.ts#5-10.

Reviewing Diffs and Checkpoints

Every proposed edit will be shown as a side-by-side diff before it will be applied. You may accept, reject or edit the proposed changes in the diff view.

If a certain change fails, you can hover over any previous message and find the rewind option with three choices:

  • Fork conversation from here – fork the conversation while keeping the code changes
  • Rewind code to here – revert files, keeping the whole conversation
  • Fork conversation and rewind code – both

It was the most comforting feature in our testing because it removes the fear of making a change that cannot be undone.

Session History and Usage Tracking

Click Session history at the top of the panel to browse through the history of conversations by date or search in it. To track your usage, type /usage in the command menu to open Account & Usage dialog, showing your plan, current usage bars and factors affecting your usage with the Day/Week toggle.

Using Git with VS Code

Claude Code detects your Git status automatically and offers help in the usual Git tasks via prompts:

commit my changes with a descriptive message

create a pr for this feature

summarize the changes I’ve made to the auth module

For bigger projects, you may run isolated parallel sessions with the help of Git worktrees, so that multiple Claude Code sessions do not interfere with each other:

claude –worktree feature-auth

We used this once during testing to be able to work simultaneously on fixing a bug and updating documentation without having one session to influence another.

Common Errors

Error Fix
Extension won’t install VS Code is 1.98.0+ version, confirm extension or install it from VS Code.
Spark icon not visible Open a file, otherwise use the Status Bar icon
Cmd+Esc does nothing (macOS) macOS Settings → Keyboard → Shortcuts or the extension’s shortcut
Claude Code never responds Check connection, start a new conversation or switch to the CLI for more detailed error messages

If the extension failed to detect VS Code, running /ide in a session will solve this issue for you almost every time we have encountered it once while testing, but solved in less than 30 seconds.

Security Considerations

Claude Code does not use your code for training models. However, with edit permissions on, it may modify VS Code configuration files that VS Code may execute automatically. There are some habits to maintain:

  • Enable Restricted Mode for untrusted workspaces
  • Work in the Manual permission mode if you work with code you do not know
  • Review the diffs carefully before accepting, especially for configuration files

Do You Need Claude Pro?

Yes, the extension requires a paid subscription or Console account, so you do not have a free tier. The cheapest is Pro at $20/month, it is enough for most individual developers to start with.

API Credits vs Pro

Option How it’s billed Best for
Pro / Max / Team / Enterprise Flat monthly subscription Predictable cost, daily usage
Console (API) account Pay-per-token Variable/heavy usage, teams billing by project

Which Plan Should You Choose?

In our testing, Pro could handle the usual daily usage of VS Code. When you constantly face usage limits shown in the /usage panel, it is time for Max, it is designed for heavy daily usage in bigger projects.

CLI vs VS Code Extension: Which Should You Use

They connect to the same Claude Code engine and share conversation history, but are not the same:

Feature CLI VS Code Extension
Commands and skills All Subset
MCP server config Full Partial (configured via CLI, managed with /mcp)
Checkpoints Yes Yes
! bash shortcut Yes No
Tab completion Yes No

Our opinion: use the extension for the routine file editing and drop in the CLI (Ctrl+` in VS Code) for everything requiring the full command set and scripts. You do not need to choose one – claude –resume starts the conversation from the extension in the terminal.

Tips for Getting Started

  • Use Manual permission mode until you understand the behavior of Claude Code in your codebase
  • Use @-mentions early – it is faster than typing about the file
  • Check /usage in your first week to see your usage pattern before it becomes a problem
  • Keep Restricted Mode on for any project that is not written by you
  • Do not avoid Git – learn how to use Git worktrees once you have more than one task at once

Final Verdict

The VS Code extension is definitely a worthy upgrade from the terminal-only Claude Code, not just the wrapper for it. Diff view, checkpoints and @-mentions have helped to remove the friction in our testing, and the setup process takes a few minutes, once you know where the Spark icon is. Our advice: install the extension for daily work, but keep the CLI installed. You will need it when you need some command unavailable in the extension’s panel.

Frequently Asked Questions

Yes, install the standalone CLI and run claude in VS Code's integrated terminal. It auto-connects for diff viewing without needing the graphical panel at all.
No, the extension signs in directly with your Claude account. An API key is only needed if you're connecting through a third-party provider like Amazon Bedrock instead.
No, Claude Code requires a paid Claude subscription or a Console account. There is no free tier, though usage is included within your existing plan's limits at no extra setup cost.
Most Related