Text of code.claude.com › docs › en › vs-code as Styx crawled it on Nov 19, 2026. The page may have changed since. Only its words are kept, without pictures or layout, and only the first part of a long page.

Open the live page

Use Claude Code in VS Code - Claude Code Docs

Documentation Index Fetch the complete documentation index at: /docs/llms.txt Use this file to discover all available pages before exploring further. Skip to main content Assistant Responses are generated using AI and may contain mistakes. The VS Code extension provides a native graphical interface for Claude Code, integrated directly into your IDE. This is the recommended way to use Claude Code in VS Code. With the extension, you can: Review and edit Claude’s plans before accepting them Auto-accept edits as they’re made @-mention files with specific line ranges from your selection Access conversation history Open multiple conversations in separate tabs or windows Prerequisites Before installing, make sure you have: VS Code 1.94.0 or later An Anthropic account: any paid Claude subscription (Pro, Max, Ultra, Team, or Enterprise) or a Claude Console account works, and no API key is required.

You’ll sign in with this account when you first open the extension. For a provider like Amazon Bedrock or Google Cloud’s Agent Platform, see Use third-party providers . For a Claude apps gateway, see Sign in to a Claude apps gateway . The extension bundles its own copy of the CLI (command-line interface) for the chat panel. To run claude in VS Code’s integrated terminal, you also need the standalone CLI install .

See VS Code extension vs. Claude Code CLI for details. Install the extension Click the link for your IDE to install directly: Install for VS Code Install for Cursor Or in VS Code, press Cmd+Shift+X (Mac) or Ctrl+Shift+X (Windows/Linux) to open the Extensions view, search for “Claude Code”, and click Install . Extension marketplaces are third-party software, which Anthropic doesn’t endorse, maintain, or audit. Anthropic submits extensions for publication to the Visual Studio Marketplace and Open VSX Registry.

The extension’s version number is the Claude Code version it bundles. For example, a feature that requires Claude Code v2.1.286 or later needs version 2.1.286 or later of the extension, which the Extensions view shows. Claude Code also runs in other editors and containers: Other VS Code forks : the extension also installs in forks like Devin Desktop or Kiro. Search for “Claude Code” in the editor’s Extensions view, or install from the Open VSX Registry .

Editors that can’t install the extension : install the CLI and run claude in the editor’s integrated terminal instead. The CLI works in any terminal. Dev containers : to run Claude Code inside a dev container, see Development containers . If the extension doesn’t appear after installation, restart VS Code or run “Developer: Reload Window” from the Command Palette. Get started Once installed, you can start using Claude Code through the VS Code interface: 1 Open the Claude Code panel Throughout VS Code, the Spark icon indicates Claude Code: The quickest way to open Claude is to click the Spark icon in the Editor Toolbar (top-right corner of the editor).

The icon only appears when you have a file open. Other ways to open Claude Code: Activity Bar : click the Spark icon in the left sidebar to open the sessions list. Click any session to open it in your preferred location , or start a new one. This icon is always visible in the Activity Bar. Command Palette : Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux), type “Claude Code”, and select an option like “Open in New Tab” Status Bar : click ✻ Claude Code in the bottom-right corner of the window.

This works even when no file is open. You can drag the Claude panel to reposition it anywhere in VS Code. See Customize your workflow for details. 2 Sign in The first time you open the panel, a sign-in screen appears. Click Sign in and complete authorization in your browser. If you see Not logged in · Please run /login later, the extension reopens the sign-in screen automatically. If it doesn’t appear, reload the window from the Command Palette with Developer: Reload Window .

If you have ANTHROPIC_API_KEY set in your shell but still see the sign-in prompt, VS Code may not have inherited your shell environment. Launch VS Code from a terminal with code . so it inherits your environment variables, or sign in with your Claude account instead. After you sign in, a Learn Claude Code checklist appears. Work through each item by clicking Show me , or dismiss it with the X. To reopen it later, uncheck Hide Onboarding in VS Code settings under Extensions > Claude Code .

3 Send a prompt Ask Claude to help with your code or files, whether that’s explaining how something works, debugging an issue, or making changes. Claude automatically sees your selected text. Press Option+K (Mac) / Alt+K (Windows/Linux) to also insert an @-mention reference (like @file.ts#5-10 ) into your prompt. Here’s an example of asking about a particular line in a file: 4 Review changes Check the permission mode shown at the bottom of the prompt box: In Auto or Edit automatically mode, Claude edits most files in your workspace without asking.

In Manual mode, when Claude wants to edit a file, it shows a side-by-side comparison of the original and proposed changes, then asks for permission. You can accept, reject, or tell Claude what to do instead. If you edit the proposed content directly in the diff view before accepting, Claude is told that you modified it so it doesn’t assume the file matches its original proposal. To review a proposed edit one change at a time, use the Accept this change and Reject this change buttons under each change in the diff.

Rejecting a change reverts it in the proposed content; accepting marks it as reviewed. Per-change review requires Claude Code v2.1.275 or later. Accepting or rejecting the whole file still finishes the review. A diff with more than 100 changes opens without the per-change buttons, so review it as a whole file. The same actions are available at the cursor from the editor’s context menu and from the Command Palette as Claude Code: Accept Change at Cursor and Claude Code: Reject Change at Cursor .

For more ideas on what you can do with Claude Code, see Common workflows . Run “Claude Code: Open Walkthrough” from the Command Palette for a guided tour of the basics. Use the prompt box The prompt box supports several features: Permission modes : click the mode indicator at the bottom of the prompt box to switch permission modes. With Claude Code v2.1.283 or later, Auto is the built-in starting permission mode, and on earlier versions only on Pro, Max, Ultra, and Team plans.

See how the extension chooses the starting permission mode for what changes that, and every permission mode the indicator offers. Auto : a classifier reviews most actions instead of asking you. See auto mode for what it reviews and blocks. Manual : Claude asks permission before file edits and most shell commands. Plan : Claude describes what it will do and waits for approval before making changes. VS Code automatically opens the plan as a full Markdown document where you can add inline comments to give feedback before Claude begins.

You can also type /plan in the prompt box. Requires Claude Code v2.1.280 or later. /plan : switches to plan mode. If you’re already in plan mode, shows the current plan instead. /plan with a task, such as /plan fix the auth bug : switches to plan mode and starts planning that task. /plan open : when you’re already in plan mode, opens the plan file in the editor. Edit automatically : Claude makes edits without asking.

Model : select Switch model… from the command menu to change the model mid-session. You can also click the model name at the bottom of the prompt box to open the same picker. With Claude Code v2.1.284 or later, typing /model on its own in the prompt box opens the picker too. When the current model supports effort levels , the picker also shows an Effort row and the model name button shows the selected level. When you pick a level other than max , Claude Code saves it for the current model

The rest of this page is on the live site.