
Prerequisites
- VS Code 1.98.0 or higher
- An Anthropic account (you’ll sign in when you first open the extension). If you’re using a third-party provider like Amazon Bedrock or Google Vertex AI, see Use third-party providers instead.
Install the extension
Click the link for your IDE to install directly: Or in VS Code, pressCmd+Shift+X (Mac) or Ctrl+Shift+X (Windows/Linux) to open the Extensions view, search for “Claude Code”, and click Install.
You may need to restart VS Code or run “Developer: Reload Window” from the Command Palette after installation.
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:

- Command Palette:
Cmd+Shift+P(Mac) orCtrl+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.
2
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.Here’s an example of asking about a particular line in a file:

3
Review changes
When Claude wants to edit a file, it shows you a diff and asks for permission. You can accept, reject, or tell Claude what to do instead.

Customize your workflow
Once you’re up and running, you can reposition the Claude panel or switch to terminal mode.Change the layout
You can drag the Claude panel to reposition it anywhere in VS Code. Grab the panel’s tab or title bar and drag it to:- Secondary sidebar (default): The right side of the window
- Primary sidebar: The left sidebar with icons for Explorer, Search, etc.
- Editor area: Opens Claude as a tab alongside your files
The Spark icon only appears in the Activity Bar (left sidebar icons) when the Claude panel is docked to the left. Since Claude defaults to the right side, use the Editor Toolbar icon to open Claude.
Switch to terminal mode
By default, the extension opens a graphical chat panel. If you prefer the CLI-style interface, open the Use Terminal setting and check the box. You can also open VS Code settings (Cmd+, on Mac or Ctrl+, on Windows/Linux), go to Extensions → Claude Code, and check Use Terminal.
VS Code commands and shortcuts
Open the Command Palette (Cmd+Shift+P on Mac or Ctrl+Shift+P on Windows/Linux) and type “Claude Code” to see all available VS Code commands for the Claude Code extension:
These are VS Code commands for controlling the extension. For Claude Code slash commands (like
/help or /compact), not all CLI commands are available in the extension yet. See VS Code extension vs. Claude Code CLI for details.| Command | Shortcut | Description |
|---|---|---|
| Focus Input | Cmd+Esc (Mac) / Ctrl+Esc (Windows/Linux) | Toggle focus between editor and Claude |
| Open in Side Bar | — | Open Claude in the left sidebar |
| Open in Terminal | — | Open Claude in terminal mode |
| Open in New Tab | Cmd+Shift+Esc (Mac) / Ctrl+Shift+Esc (Windows/Linux) | Open a new conversation as an editor tab |
| Open in New Window | — | Open a new conversation in a separate window |
| New Conversation | Cmd+N (Mac) / Ctrl+N (Windows/Linux) | Start a new conversation (when Claude is focused) |
| Insert @-Mention Reference | Alt+K | Insert a reference to the current file (includes line numbers if text is selected) |
| Show Logs | — | View extension debug logs |
| Logout | — | Sign out of your Anthropic account |
Configure settings
The extension has two types of settings:-
Extension settings: Open with
Cmd+,(Mac) orCtrl+,(Windows/Linux), then go to Extensions → Claude Code.Setting Description Selected Model Default model for new conversations. Change per-session with /model.Use Terminal Launch Claude in terminal mode instead of graphical panel Initial Permission Mode Controls approval prompts for file edits and commands. Defaults to default(ask before each action).Preferred Location Default location: sidebar (right) or panel (new tab) Autosave Auto-save files before Claude reads or writes them Use Ctrl+Enter to Send Use Ctrl/Cmd+Enter instead of Enter to send prompts Enable New Conversation Shortcut Enable Cmd/Ctrl+N to start a new conversation Respect Git Ignore Exclude .gitignore patterns from file searches Environment Variables Set environment variables for the Claude process. Not recommended—use Claude Code settings instead so configuration is shared between extension and CLI. Disable Login Prompt Skip authentication prompts (for third-party provider setups) Allow Dangerously Skip Permissions Bypass all permission prompts. Use with extreme caution—recommended only for isolated sandboxes with no internet access. Claude Process Wrapper Executable path used to launch the Claude process -
Claude Code settings (
~/.claude/settings.json): These settings are shared between the VS Code extension and the CLI. Use this file for allowed commands and directories, environment variables, hooks, and MCP servers. See the settings documentation for details.
Use third-party providers
By default, Claude Code connects directly to Anthropic’s API. If your organization uses Amazon Bedrock, Google Vertex AI, or Microsoft Foundry to access Claude, configure the extension to use your provider instead:1
Disable login prompt
Open the Disable Login Prompt setting and check the box.You can also open VS Code settings (
Cmd+, on Mac or Ctrl+, on Windows/Linux), search for “Claude Code login”, and check Disable Login Prompt.2
Configure your provider
Follow the setup guide for your provider:These guides cover configuring your provider in
~/.claude/settings.json, which ensures your settings are shared between the VS Code extension and the CLI.VS Code extension vs. Claude Code CLI
The extension doesn’t yet have full feature parity with the CLI. If you need CLI-only features, you can runclaude directly in VS Code’s integrated terminal.
| Feature | CLI | VS Code Extension |
|---|---|---|
| Slash commands | Full set | Subset (type / to see available) |
| MCP server config | Yes | No (configure via CLI, use in extension) |
| Checkpoints | Yes | Coming soon |
! bash shortcut | Yes | No |
| Tab completion | Yes | No |
Run CLI in VS Code
To use the CLI while staying in VS Code, open the integrated terminal (Ctrl+` on Windows/Linux or Cmd+` on Mac) and run claude. The CLI automatically integrates with your IDE for features like diff viewing and diagnostic sharing.
If using an external terminal, run /ide inside Claude Code to connect it to VS Code.
Switch between extension and CLI
The extension and CLI share the same conversation history. To continue an extension conversation in the CLI, runclaude --resume in the terminal. This opens an interactive picker where you can search for and select your conversation.
Security considerations
With auto-edit permissions enabled, Claude Code can modify VS Code configuration files (likesettings.json or tasks.json) that VS Code may execute automatically. This could potentially bypass Claude Code’s normal permission prompts.
To reduce risk when working with untrusted code:
- Enable VS Code Restricted Mode for untrusted workspaces
- Use manual approval mode instead of auto-accept for edits
- Review changes carefully before accepting them
Fix common issues
Extension won’t install
- Ensure you have a compatible version of VS Code (1.98.0 or later)
- Check that VS Code has permission to install extensions
- Try installing directly from the Marketplace website
Spark icon not visible
The Spark icon appears in the Editor Toolbar (top-right of editor) when you have a file open. If you don’t see it:- Open a file: The icon requires a file to be open—having just a folder open isn’t enough
- Check VS Code version: Requires 1.98.0 or higher (Help → About)
- Restart VS Code: Run “Developer: Reload Window” from the Command Palette
- Disable conflicting extensions: Temporarily disable other AI extensions (Cline, Continue, etc.)
- Check workspace trust: The extension doesn’t work in Restricted Mode
Cmd+Shift+P / Ctrl+Shift+P) and type “Claude Code”.
Claude Code never responds
If Claude Code isn’t responding to your prompts:- Check your internet connection: Ensure you have a stable internet connection
- Start a new conversation: Try starting a fresh conversation to see if the issue persists
- Try the CLI: Run
claudefrom the terminal to see if you get more detailed error messages - File a bug report: If the problem continues, file an issue on GitHub with details about the error
Standalone CLI not connecting to IDE
- Ensure you’re running Claude Code from VS Code’s integrated terminal (not an external terminal)
- Ensure the CLI for your IDE variant is installed:
- VS Code:
codecommand should be available - Cursor:
cursorcommand should be available - Windsurf:
windsurfcommand should be available - VSCodium:
codiumcommand should be available
- VS Code:
- If the command isn’t available, install it from the Command Palette → “Shell Command: Install ‘code’ command in PATH”
Uninstall the extension
To uninstall the Claude Code extension:- Open the Extensions view (
Cmd+Shift+Xon Mac orCtrl+Shift+Xon Windows/Linux) - Search for “Claude Code”
- Click Uninstall
Next steps
Now that you have Claude Code set up in VS Code:- Explore common workflows to get the most out of Claude Code
- Set up MCP servers to extend Claude’s capabilities with external tools. Configure servers using the CLI, then use them in the extension.
- Configure Claude Code settings to customize allowed commands, hooks, and more. These settings are shared between the extension and CLI.