Guilds AI / Blog

,

Claude Code in VS Code: Install, Open and Use the Extension

Illustration of the Claude Code extension in a VS Code editor with setup and usage steps.

To use Claude Code in VS Code, install the official Anthropic extension, open its panel from the Command Palette or editor toolbar, and sign in with an authorized account. You can then inspect project files, review implementation plans and approve code changes. This guide explains the editor workflow, not just how to run the standalone CLI inside a terminal. For help choosing between the editor-based agent and the general Claude interface, read our Claude Code vs Claude Chat guide.

For notebook-specific editing and reproducible execution in the editor, see our Claude Code Jupyter notebook guide.

To include a screenshot as context for an editor task, see our guide to pasting images into Claude Code.

If you prefer to work with OpenAI’s separate editor agent, see our guide to using Codex in Cursor.

If you are deciding between Anthropic’s agent and a dedicated AI editor, see our Cursor vs Claude Code comparison.

What you need before installing Claude Code

Claude Code for VS Code is Anthropic’s editor extension for working with an AI coding agent inside Visual Studio Code. Its conversation panel can use project files as context, propose code changes and show changes in the editor. It is different from a Claude model accessed through another company’s coding extension.

Anthropic’s current requirements are VS Code 1.94 or newer and authorized Claude access through a paid subscription, developer Console account or supported provider. Check your organization’s access policy before connecting a repository. Downloading an extension does not establish entitlement to model usage or unlimited requests.

Start with an existing local project that you are allowed to use. Avoid opening a directory containing unrelated confidential files or production credentials.

Step 1: Install the official extension

Open VS Code and select its Extensions view. Search for Claude Code, verify that the publisher is Anthropic and install the official extension. Its marketplace identifier is anthropic.claude-code.

If the VS Code command-line launcher is already on your PATH, you can use this equivalent installation command:

code --install-extension anthropic.claude-code

Check the installed extension version in the Extensions view. The panel includes its own Claude Code executable, so you do not have to install the standalone terminal CLI merely to use the graphical interface.

Step 2: How to open Claude Code in VS Code

Open your project folder in VS Code. Use the Command Palette with Command-Shift-P on macOS or Ctrl-Shift-P on Windows and Linux. Search for Claude Code and select its Open in New Tab command. This is a useful route even when the editor toolbar icon is not visible.

If a project file is open, the Spark icon in the editor toolbar also opens the assistant. The Activity Bar provides access to sessions. Choose the location that works best for your editor layout, then move or resize the panel as needed.

Complete the sign-in flow using your eligible account. Normal subscription sign-in does not require manually generating a developer API key. If your organization uses a managed provider or gateway, use the approved sign-in instructions. Check the active account and billing arrangement before sending requests.

Step 3: Use Claude Code on a project

Begin by asking the assistant to inspect a narrow part of the repository. Select a relevant code block or mention a file with the @ reference mechanism instead of supplying the entire project as a pasted prompt. Check whether the referenced file is the intended version.

For example, imagine a project has a function that converts an order quantity from a string into a number. You suspect it accepts negative quantities. The following is an original sample prompt for exploring that issue:

Inspect the order quantity validator and its tests. Explain whether negative quantities are accepted. Propose a minimal fix and regression tests. Do not change files until I review the plan.

Review the plan against the actual source. If the proposed change is appropriate, authorize only the relevant edits. Read each diff, inspect new files and run the project’s existing tests independently. If the assistant proposes a dependency upgrade or an unrelated refactor, decide whether that extra work belongs in the task.

This scenario is illustrative, not a recorded extension session. The broader AI agents for coding guide explains how to set acceptance criteria and review results.

Manage permissions and project configuration

Use the extension’s plan or manual approval workflow for unfamiliar repositories and substantial changes. Do not treat an approval dialog as a guarantee that an operation is safe. Check which files, commands, network destinations or external tools the operation may access.

VS Code extension preferences affect the graphical interface, while Claude Code’s shared configuration controls many agent behaviors. Project instructions in CLAUDE.md can communicate coding conventions and test requirements, but instructions are not security boundaries. Use appropriate tool restrictions and environment isolation as well.

For the location and precedence of settings files, follow our Claude Code settings guide. Keep credentials outside project files and avoid committing environment-specific secrets.

VS Code extension vs. the terminal CLI

Both interfaces can support an agentic development workflow, but they suit different tasks. The editor panel is useful when reviewing changes alongside source files. The standalone CLI is useful for shell-oriented workflows and commands that the graphical interface does not expose.

TaskSuggested interface
Review proposed edits while navigating filesVS Code extension
Work with shell pipelines or scriptsStandalone CLI
Resume a prior local coding conversationEither, where the session is available
Inspect all CLI-specific commandsStandalone CLI

Installing the extension does not put the claude command on your shell PATH. To use the integrated terminal, install the standalone CLI as well, following our Claude Code terminal tutorial. You can then launch it from the same project and use its available IDE connection features. Avoid opening the same active session in two places simultaneously.

What to do if Claude Code does not open

Missing extension: Check that the official extension is installed and enabled in the current VS Code profile and workspace. Reload the editor window if installation has just completed.

No toolbar icon: Open an actual project file, or use the Command Palette instead. The layout can change depending on the selected view.

Unable to sign in: Check the account, approved authentication method and applicable organizational restrictions. Do not paste a secret key into an untrusted extension.

Restricted workspace: Review the repository’s origin and contents. Only grant workspace trust if you have established that the project is safe to execute.

Server error after login: Distinguish local activation problems from provider failures. Our Claude Code 500 error guide covers server-side troubleshooting.

Frequently asked questions

Can I use Claude Code in VS Code without a separate CLI installation? Yes, the graphical extension bundles its runtime. Running the standalone claude command in a terminal requires a separate installation.

How do I open Claude Code when the icon is missing? Use the Command Palette, search for Claude Code, and choose an available opening command.

Do I need an API key? Not for ordinary supported subscription sign-in. Separate developer API credentials and managed-provider authentication have different requirements.

Is the extension the same as GitHub Copilot? No. They are separate products, even when another product offers a Claude model.

Has Guilds AI tested the extension? This guide was checked against Anthropic’s current documentation and independent tutorial material on December 4, 2026. An authenticated VS Code session was not executed.