Claude Code started as a terminal tool, but most people now use it inside their editor. The official Claude Code extension for VS Code gives you a chat panel next to your code, inline diffs you can accept or reject, plan mode, checkpoints and multiple conversations in tabs.
It also works in VS Code forks like Cursor, and there’s a separate plugin for JetBrains IDEs.
This guide shows how to install the Claude Code VS Code extension, sign in, use its main features, change the settings that matter, and fix common problems. It follows Anthropic’s official Claude Code docs as of November 2026 (Claude Code 2.1.330).
- Install: search “Claude Code” in the Extensions view, or use the ID
anthropic.claude-code. - Needs: VS Code 1.94 or newer and a paid Claude plan (Pro, Max, Team, Enterprise) or a Claude Console account.
- No separate CLI needed: the extension bundles its own copy, but it doesn’t add
claudeto your terminal PATH. - Open it: click the Spark icon, or press
Cmd/Ctrl+Esc. - Best features: inline diffs, @-mentions with line ranges, plan mode, checkpoints, tabs.
- JetBrains: use the “Claude Code [Beta]” plugin, which needs the CLI installed first.
Requirements
| Item | Requirement |
|---|---|
| Editor | VS Code 1.94.0 or later (check Help > About) |
| Account | Claude Pro, Max, Team or Enterprise, or a Claude Console account |
| API key | Not needed for normal sign-in |
| Cloud providers | Amazon Bedrock and Google Cloud are set up in ~/.claude/settings.json |
| Separate CLI | Optional (the extension bundles its own) |
The free Claude plan doesn’t include Claude Code. Compare the paid tiers in our Claude Code pricing guide.
Install the Extension
- Open the Extensions view with
Cmd+Shift+X(Mac) orCtrl+Shift+X(Windows and Linux). - Search for “Claude Code” and check the publisher is Anthropic. The marketplace ID is
anthropic.claude-code. - Click Install.
- Click the Spark icon in the editor toolbar or Activity Bar to open the panel.
- Click Sign in and finish logging in to your Claude account in the browser.
- Return to VS Code. The panel is ready for your first prompt.
Only install the extension from Anthropic’s official listing. Fake look-alike extensions have targeted AI coding tools before; our extension backdoor check shows how to spot and remove them.
Extension vs CLI: How They Fit Together
- Bundled CLI: the extension ships with a private copy of Claude Code, so you don’t have to install the CLI separately.
- Not on PATH: that bundled copy isn’t added to your terminal. To type
claudein a terminal, install the standalone CLI too. - Same version: the extension’s version matches the Claude Code version it bundles.
- Shared history:
claude --resumein a terminal can pick up conversations you started in the extension. - Shared settings: both read
~/.claude/settings.json, so permissions, hooks and MCP servers carry over.
| Feature | VS Code extension | Terminal CLI |
|---|---|---|
| Inline diffs in the editor | Yes | No (diffs in terminal) |
| Checkpoints and rewind | Yes | Yes |
| MCP servers | Yes | Yes |
| All slash commands and skills | A subset | All |
! bash shortcut |
No | Yes |
| Tab completion | No | Yes |
For the full command list, see our Claude Code commands cheat sheet.
Your First Task in the Panel
- Open a project folder in VS Code so Claude can see your files.
- Select some code you want to change, or open the file.
- Press
Option+K(Mac) orAlt+Kto insert an @-mention of the file and selected lines, such as@app.ts#5-10. - Describe the change, for example: “Add input validation to this function and a unit test.”
- Review the inline diff. Accept or reject each change in the editor.
- Ask follow-ups in the same conversation, or open a new tab for an unrelated task.
Claude asks for permission before editing files or running commands unless you change the permission mode.
Key Features
| Feature | What it does |
|---|---|
| Inline diffs | See proposed edits in the editor, with Accept or Reject Change at Cursor |
| @-mentions | Point Claude at files and exact line ranges |
| Plan mode | Claude writes a plan as Markdown you can comment on before any code changes; also /plan |
| Permission modes | Default (ask), plan, acceptEdits, and bypassPermissions |
| Tabs and windows | Run several conversations at once |
| Checkpoints | Hover a message to rewind code, or fork and rewind |
| MCP and plugins | Manage MCP servers with /mcp and add plugins from marketplaces |
| Cloud sessions | Resume Claude Code sessions started on claude.ai |
| Terminal mode | Run the classic terminal interface inside VS Code (claudeCode.useTerminal) |
Tab status dots: a blue dot means Claude is waiting for your permission. An orange dot means it finished while the tab was hidden.
Plan mode is the safest way to start bigger changes. Our Claude Code plan mode guide covers it in detail.
Keyboard Shortcuts
| Shortcut (Mac / Windows and Linux) | Action |
|---|---|
Cmd+Esc / Ctrl+Esc |
Toggle focus between the editor and Claude |
Cmd+Shift+Esc / Ctrl+Shift+Esc |
Open a new conversation tab |
Option+K / Alt+K |
Insert an @-mention for the current file and selection |
Ctrl+Option+F / Ctrl+Alt+F |
Toggle Focus view |
macOS Tahoe note: the system Game Overlay uses Cmd+Esc by default. Turn that shortcut off in System Settings if the toggle doesn’t work.
Settings Worth Changing
Open VS Code settings and search for claudeCode.
| Setting | What it controls |
|---|---|
claudeCode.preferredLocation |
Open Claude in the sidebar or the panel |
claudeCode.initialPermissionMode |
Starting permission mode (read from user settings only) |
claudeCode.useTerminal |
Use the terminal interface instead of the graphical panel |
claudeCode.autosave |
Save files automatically around Claude’s edits |
claudeCode.attachOpenFile |
Include the open file as context |
claudeCode.attachSelection |
Include your current selection as context |
claudeCode.useCtrlEnterToSend |
Send with Ctrl+Enter so Enter adds a new line |
claudeCode.lockEditorGroups |
Keep Claude’s editor group fixed |
claudeCode.enableNewConversationShortcut |
Turn the new-tab shortcut on or off |
Project rules, hooks and permissions live in Claude Code’s own settings files, not VS Code’s. See our Claude Code hooks guide and AGENTS.md guide for project instructions.
Cursor, Other Forks and JetBrains
- Cursor: Anthropic’s docs give a direct install link for Cursor, and the extension works the same way.
- Other VS Code forks: editors that use Open VSX can install the
Anthropic/claude-codelisting there. - JetBrains IDEs: install “Claude Code [Beta]” from the JetBrains Marketplace for IntelliJ, PyCharm, WebStorm and others.
The JetBrains plugin doesn’t bundle the CLI. Install Claude Code in a terminal first, or it shows “Cannot launch Claude Code”. Comparing coding tools? See GitHub Copilot Free and our Cursor rules guide.
Tips for Daily Use
- Start big tasks in plan mode. Read and comment on the plan before letting Claude edit files.
- Mention exact lines.
@file#10-40keeps Claude focused and saves usage. - Use one tab per task. Separate conversations keep context clean and answers sharper.
- Rewind instead of arguing. If an edit goes wrong, use a checkpoint to roll back and rephrase.
- Keep the CLI handy. Install the standalone CLI for scripts, the
!shortcut and better error messages. - Add MCP servers carefully. Only connect tools you trust. Our best MCP servers list is a good start.
Troubleshooting
| Problem | Likely cause | Fix |
|---|---|---|
| Extension won’t install | VS Code older than 1.94 | Update VS Code, check Help > About, or install from the Marketplace website |
| Panel is blank or stuck | Extension host glitch | Run “Developer: Reload Window” from the Command Palette |
claude not found in terminal |
Bundled CLI isn’t on PATH | Install the standalone Claude Code CLI |
| “Could not locate the Claude CLI on PATH” | Terminal mode or plugin expects the CLI | Install the CLI, then reload the window |
Cmd+Esc does nothing on Mac |
macOS Game Overlay shortcut | Disable it in System Settings |
| JetBrains: “Cannot launch Claude Code” | CLI not installed | Install Claude Code in a terminal first |
| Sign-in loop | Browser login didn’t return | Sign out, reload the window and sign in again |
For more detail on errors, run claude in a terminal, which prints fuller messages. Our Claude Code not working fix guide and how to update Claude Code cover the rest.
FAQ
Is the Claude Code VS Code extension free?
The extension is free to install, but Claude Code needs a paid Claude plan (Pro, Max, Team or Enterprise) or a Claude Console account.
Do I need to install the Claude Code CLI separately?
No. The extension bundles its own copy. Install the CLI only if you want to run claude in a terminal.
What VS Code version does Claude Code need?
VS Code 1.94.0 or later.
Does the Claude Code extension work in Cursor?
Yes. Anthropic’s docs include a direct install link for Cursor, and other forks can use the Open VSX listing.
How do I open Claude Code in VS Code?
Click the Spark icon in the editor toolbar or Activity Bar, or press Cmd+Esc on Mac or Ctrl+Esc on Windows and Linux.
Can I use plan mode in the extension?
Yes. Switch to plan mode or type /plan. The plan opens as Markdown you can comment on.
Is there a Claude Code plugin for JetBrains?
Yes, “Claude Code [Beta]” on the JetBrains Marketplace. It needs the Claude Code CLI installed first.




