
VS Code Extension (Beta)
The VS Code extension, available in beta, lets you see Claude’s changes in real-time through a native graphical interface integrated directly into your IDE. The VS Code extension makes it easier to access and interact with Claude Code for users who prefer a visual interface over the terminal.Features
The VS Code extension provides:- Native IDE experience: Dedicated Claude Code sidebar panel accessed via the Spark icon
- Plan mode with editing: Review and edit Claude’s plans before accepting them
- Auto-accept edits mode: Automatically apply Claude’s changes as they’re made
- Extended thinking: Toggle extended thinking on/off using the Extended Thinking button in the bottom-right corner of the prompt input
- File management: @-mention files or attach files and images using the system file picker
- MCP server usage: Use Model Context Protocol servers configured through the CLI
- Conversation history: Access to past conversations
- Multiple sessions: Run multiple Claude Code sessions simultaneously
- Keyboard shortcuts: Support for most shortcuts from the CLI
- Slash commands: Access most CLI slash commands directly in the extension
Requirements
- VS Code 1.98.0 or higher
Installation
Download and install the extension from the Visual Studio Code Extension Marketplace.How it works
Once installed, you can start using Claude Code through the VS Code interface:- Click the Spark icon in your editor’s sidebar to open the Claude Code panel
- Prompt Claude Code in the same way you would in the terminal
- Watch as Claude analyzes your code and suggests changes
- Review and accept edits directly in the interface
- Tip: Drag the sidebar wider to see inline diffs, then click them to expand for full details
Configuration
The VS Code extension reads the samesettings.json files as the CLI. See the settings documentation for details.
Third-party providers and gateways
To use the VS Code extension with third-party providers (Amazon Bedrock, Google Vertex AI, Microsoft Foundry) or gateways that handle authentication:-
Add the appropriate environment variables for your provider or gateway to your Claude Code
settings.json: -
Disable the VS Code extension login prompt via
vscode://settings/claudeCode.disableLoginPromptor in VS Code’s settings:
Not yet implemented
The following features aren’t yet available in the VS Code extension:- MCP server and Plugin configuration UI: Type
/mcpto open the terminal-based MCP server configuration, or/pluginfor Plugin configuration. Once configured, MCP servers and Plugins work in the extension. You can also configure MCP servers through the CLI first, then the extension will use them. - Subagents configuration: Configure subagents through the CLI to use them in VS Code
- Checkpoints: Save and restore conversation state at specific points
- Conversation rewinding: The
/rewindcommand is coming soon - Advanced shortcuts:
#shortcut to add to memory (not supported)!shortcut to run bash commands directly (not supported)
- Tab completion: File path completion with tab key
- Model selection UI for older models: To use older model versions like
claude-sonnet-4-20250514, open VS Code settings for Claude Code (the/General Configcommand) and insert the model string directly into the ‘Selected Model’ field
Security considerations
When Claude Code runs in VS Code with auto-edit permissions enabled, it may be able to modify IDE configuration files that can be automatically executed by your IDE. This may increase the risk of running Claude Code in auto-edit mode and allow bypassing Claude Code’s permission prompts for bash execution. When running in VS Code, consider:- Enabling VS Code Restricted Mode for untrusted workspaces
- Using manual approval mode for edits
- Taking extra care to ensure Claude is only used with trusted prompts
Legacy CLI integration
The original VS Code integration allows Claude Code running in the terminal to interact with your IDE. It provides selection context sharing (current selection/tab is automatically shared with Claude Code), diff viewing in the IDE instead of terminal, file reference shortcuts (Cmd+Option+K on Mac or Alt+Ctrl+K on Windows/Linux to insert file references like @File#L1-99), and automatic diagnostic sharing (lint and syntax errors).
The legacy integration auto-installs when you run claude from VS Code’s integrated terminal. Run claude from the terminal and all features activate. For external terminals, use the /ide command to connect Claude Code to your VS Code instance. To configure, run claude, enter /config, and set the diff tool to auto for automatic IDE detection.
Both the extension and CLI integration work with Visual Studio Code, Cursor, Windsurf, and VSCodium.
Troubleshooting
Extension not installing
- Ensure you have a compatible version of VS Code (1.85.0 or later)
- Check that VS Code has permission to install extensions
- Try installing directly from the Marketplace website
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
Legacy integration not working
- Ensure you’re running Claude Code from VS Code’s integrated 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 installed:
- Open command palette with
Cmd+Shift+P(Mac) orCtrl+Shift+P(Windows/Linux) - Search for
Shell Command: Install 'code' command in PATH(or equivalent for your IDE)
- Open command palette with