# Claude Code VS Code extension: setup, diffs, settings

URL: https://agentvera.dev/en/blog/claude-code-vs-code/ · Published: 2026-10-23

Install the Claude Code VS Code extension, use selection context and the diff view, pick the right settings, fix common problems, and set it up in JetBrains IDEs.

**In short:**

- The official Claude Code extension (anthropic.claude-code) needs VS Code 1.94.0 or later and a Pro, Max, Team or Enterprise plan or a Console account.
- Installing the extension does not put claude on your PATH; install the standalone CLI to use it in a terminal, and both share conversation history.
- In JetBrains IDEs, the Claude Code [Beta] plugin runs the claude CLI in the IDE terminal, so the CLI must be installed first.

The Claude Code VS Code extension is Anthropic's official extension (ID `anthropic.claude-code`) that puts Claude Code in a graphical panel inside VS Code. You install it from the Extensions view, sign in, and then Claude sees your open file and selection, shows proposed edits as side-by-side diffs you accept or reject, and shares history with the CLI. It needs VS Code 1.94.0 or later and a paid Claude plan or a Console account. If you prefer the terminal, you can also run the `claude` CLI in VS Code's integrated terminal and keep the IDE diffs.

This guide covers install, the extension versus the CLI, the diff view, selection context, the settings worth changing, common problems, and a short section on JetBrains. Everything here is from the official [VS Code docs](https://code.claude.com/docs/en/vs-code "Claude Code in VS Code") and [JetBrains docs](https://code.claude.com/docs/en/jetbrains "Claude Code in JetBrains IDEs").

## Install the extension

1. Open VS Code and press `Cmd+Shift+X` (Mac) or `Ctrl+Shift+X` (Windows/Linux).
2. Search for **Claude Code** and install the extension from Anthropic.
3. If it does not appear right away, restart VS Code or run **Developer: Reload Window** from the Command Palette.
4. Open the panel and sign in when it asks.

Requirements:

| Requirement | Detail |
| --- | --- |
| VS Code | 1.94.0 or later |
| Account | Pro, Max, Team or Enterprise plan, or a Console account |
| Workspace | Trusted (the extension does not run in Restricted Mode) |

### Cursor and other VS Code forks

The docs give a direct **Install for Cursor** link, so Cursor is supported. Other VS Code forks can install the extension from the Open VSX registry. If your editor cannot install it at all, open its integrated terminal and run `claude`.

## Open Claude Code

There are four ways in:

- **Spark icon** in the editor toolbar, top right. It only shows when a file is open.
- **Activity Bar** sessions list on the left.
- **Command Palette** (`Cmd+Shift+P` / `Ctrl+Shift+P`): type "Claude Code" and pick **Open in New Tab**.
- **Status bar**: click **✻ Claude Code** in the bottom-right corner. Works without an open file.

You can drag the panel to the secondary sidebar (right), the primary sidebar (left) or the editor area as a tab. The docs suggest the sidebar for your main session and tabs for side tasks.

## Extension or CLI in the integrated terminal?

Both are the same Claude Code. The difference is the interface and a handful of features.

| Feature | CLI | VS Code extension |
| --- | --- | --- |
| Commands and skills | All | A subset (type `/` to see them) |
| MCP server config | Yes | Yes, with `/mcp` in the panel |
| Checkpoints | Yes | Yes |
| `!` shell shortcut | Yes | No |
| Tab completion | Yes | No |

The catch that trips people up: **installing the extension does not put `claude` on your PATH.** The extension bundles a private copy of the CLI for its panel. To type `claude` in a terminal you need the [standalone CLI install](https://code.claude.com/docs/en/setup "Set up Claude Code").

Once both are installed, they share conversation history. Run `claude --resume` in the terminal to pick up a conversation you started in the panel.

To run the CLI inside VS Code, press `` Ctrl+` `` (or `` Cmd+` `` on Mac) and run `claude`. It connects to the IDE automatically for diffs and diagnostics. From an external terminal, run `/ide` inside Claude Code to connect it to VS Code.

If you like the terminal interface but want it in the panel's place, turn on the **Use Terminal** setting (`claudeCode.useTerminal`).

Rule of thumb: use the panel when you want to click through diffs and see plans as documents. Use the CLI when you want every slash command, `!` shell mode, and the [keyboard shortcuts from our cheat sheet](/en/blog/claude-code-commands-cheat-sheet/ "Claude Code commands cheat sheet").

## Selection context and @-mentions

The extension adds the file open in the editor to your message, and Claude sees the text you have selected. You do not need to paste code into the prompt.

- `Option+K` (Mac) / `Alt+K` (Windows/Linux) inserts a reference to the current file and selection, such as `@auth.ts#5-10`. The editor must be focused.
- `@` in the prompt box mentions any file or folder.
- `@terminal:name` references a terminal's output.
- `Cmd+Esc` / `Ctrl+Esc` toggles focus between the editor and Claude.

Privacy note: selected text is not sent from files matched by `files.exclude` or `search.exclude`, or from gitignored files while `respectGitIgnore` is on. This applies to the chat panel. If you only want your selection sent, not the whole open file, turn off `attachOpenFile`.

## The diff view

When Claude wants to change a file in Manual mode, VS Code shows a side-by-side diff of the proposed edit. You can accept it, reject it, or edit the proposed text before you accept. Recent versions also let you accept or reject single changes inside one edit, with **Accept Change at Cursor** and **Reject Change at Cursor** in the Command Palette. Very large edits (over 100 changes) do not get per-change buttons.

How often you see diffs depends on the permission mode in the prompt box:

| Mode | What happens |
| --- | --- |
| Manual | Claude asks before each edit and shows the diff |
| Edit automatically | Edits are applied without asking |
| Plan | Claude writes a plan as a Markdown document you can comment on, then waits |
| Auto | Claude decides with a safety check; this is the default in recent versions |

Checkpoints sit on top of this. Hover over a message for the rewind button: **Rewind code to here**, **Fork conversation from here**, or both at once.

## Settings worth changing

Open VS Code settings (`Cmd+,` / `Ctrl+,`) and go to **Extensions > Claude Code**. Shared settings such as allowed commands, hooks and MCP servers belong in `~/.claude/settings.json`, which the CLI reads too.

| Setting | Default | Why change it |
| --- | --- | --- |
| `useTerminal` | `false` | Open the CLI-style interface instead of the chat panel |
| `initialPermissionMode` | unset | Start new chats in `default`, `plan`, `acceptEdits` or `bypassPermissions` |
| `preferredLocation` | `panel` | `sidebar` keeps Claude docked on the right |
| `attachOpenFile` | `true` | Turn off to send only your selection |
| `autosave` | `true` | Saves files before Claude reads or writes them |
| `useCtrlEnterToSend` | `false` | Use Ctrl/Cmd+Enter to send, Enter for new lines |
| `respectGitIgnore` | `true` | Keep gitignored files out of search and selection context |
| `environmentVariables` | `[]` | Env vars for the Claude process only |
| `allowDangerouslySkipPermissions` | `false` | Adds Bypass permissions to the mode menu. Sandboxes only |

`initialPermissionMode` is read from your user settings only, not from workspace settings. Add `"$schema": "https://json.schemastore.org/claude-code-settings.json"` to `settings.json` for autocomplete.

## Run several conversations

**Open in New Tab** (`Cmd+Shift+Esc` / `Ctrl+Shift+Esc`) and **Open in New Window** start extra conversations with their own history. A colored dot on the tab's spark icon shows status: blue for a pending permission request, orange when Claude finished while the tab was hidden. The sessions list can group sessions and filter by **Needs input**, **Working** or **Completed**.

## Fix common problems

| Problem | Fix |
| --- | --- |
| Extension will not install | Check VS Code is 1.94.0+, that it may install extensions, or install from the Marketplace page |
| No Spark icon | Open a file (a folder alone is not enough), trust the workspace, disable conflicting AI extensions, reload the window |
| `Cmd+Esc` does nothing on macOS | macOS Tahoe binds it to Game Overlay. Turn that off under Keyboard Shortcuts → Game Controllers, or rebind **Claude Code: Focus input** |
| "Not logged in · Please run /login" | Reload the window and sign in again |
| `ANTHROPIC_API_KEY` not picked up | Launch VS Code from a terminal with `code .` so it inherits the environment |
| `claude` not found in the terminal | Install the standalone CLI; the extension does not add it to PATH |
| Claude never responds | Check the connection, start a new conversation, then try `claude` in a terminal for a clearer error |
| Need logs | Run **Claude Code: Show Logs** from the Command Palette |

## Claude Code in JetBrains IDEs

The **Claude Code [Beta]** plugin from the JetBrains Marketplace supports IntelliJ IDEA, PyCharm, Android Studio, WebStorm, PhpStorm and GoLand. Unlike the VS Code extension, it runs the `claude` CLI in the IDE's terminal, so install the CLI first. If it shows "Cannot launch Claude Code", `claude` is not on your PATH.

What you get:

- `Cmd+Esc` / `Ctrl+Esc` opens Claude Code from the editor.
- `Cmd+Option+K` / `Alt+Ctrl+K` inserts a file reference such as `@src/auth.ts#L1-99`.
- Proposed changes open in the IDE diff viewer. Set **Diff tool** to `auto` or `terminal` in `/config`.
- Your selection and IDE diagnostics (lint and type errors) are shared with Claude.
- From an external terminal, run `/ide` to connect.

Two fixes from the docs: if `Esc` does not interrupt Claude, go to Settings → Tools → Terminal and uncheck "Move focus to the editor with Escape". On WSL, set the plugin's Claude command to `wsl -d Ubuntu -- bash -lic "claude"`, and if you see "No available IDEs detected", add a firewall rule or switch WSL to mirrored networking.

## When a separate app for many agents makes sense

The extension is built around one editor window and a few conversations. That covers most days. It gets harder when you run four or five agents at once on different branches, or mix Claude Code with Codex or [other CLI agents](/en/blog/best-ai-coding-cli-tools/ "Best AI coding CLI tools"), and you lose track of which one needs an answer.

That is the case [AgentVera](/en/agents/claude-code/ "Claude Code in AgentVera") is built for. It is a desktop app for macOS, Windows and Linux that runs each CLI agent in its own pane, in a grid per project. It is not an editor and does not replace VS Code. Many people keep both open.

- **Many agents, one view.** The [workspace](/en/features/workspace/ "Workspace") lays agents out in grids up to 5×4. [Group view](/en/features/group-view/ "Group view") counts the agents that are working, waiting for a reply or waiting for approval, with Approve and Reject on each card.
- **Diffs without switching windows.** The [editor and terminal](/en/features/editor-and-terminal/ "Editor and terminal") tools include a file editor and a Changes tab that shows the diff between HEAD and the working tree, unified or side by side. [Git and GitHub](/en/features/git-and-github/ "Git and GitHub") adds worktrees and PRs.
- **A second read.** [Automatic code review](/en/features/code-review/ "Automatic code review") has a Claude model you choose review an agent's code when its turn ends, with file:line links.

If you are setting up parallel work, [git worktrees for parallel agents](/en/blog/git-worktree-parallel-agents/ "Git worktrees for parallel agents") is the next step.

To try AgentVera, start at the [home page](/en/ "AgentVera").

## Frequently asked questions

**How do I install the Claude Code extension in VS Code?** Open the Extensions view with Cmd+Shift+X or Ctrl+Shift+X, search for Claude Code and install the extension published by Anthropic (ID anthropic.claude-code). It needs VS Code 1.94.0 or later and a Pro, Max, Team or Enterprise plan or a Console account.

**Does the VS Code extension include the Claude Code CLI?** It bundles a private copy of the CLI for its chat panel, but it does not put claude on your PATH. To run claude in the integrated terminal, install the standalone CLI once. Both share the same conversation history, so claude --resume finds extension sessions.

**Does the Claude Code extension work in Cursor?** Yes. The VS Code docs give an Install for Cursor link, and other VS Code forks can install it from the Open VSX registry. In an editor that cannot install the extension, run claude in the integrated terminal instead.

**Why can I not see the Claude Code Spark icon?** The icon only appears in the editor toolbar when a file is open. Check that VS Code is 1.94.0 or later, the workspace is trusted, and no other AI extension conflicts, then run Developer: Reload Window. The Claude Code item in the status bar works without an open file.

**Is there a Claude Code plugin for JetBrains IDEs?** Yes. The Claude Code [Beta] plugin from the JetBrains Marketplace works with IntelliJ IDEA, PyCharm, WebStorm, GoLand, PhpStorm and Android Studio. It runs the CLI in the IDE terminal, so the CLI must be installed, and it adds IDE diffs and selection sharing.

---

**About AgentVera.** AgentVera is a desktop app for macOS, Windows and Linux, built by Solviera Teknoloji. It runs 18 AI coding agents (Claude Code, Codex, Gemini CLI, Copilot, Cursor, Antigravity, opencode, Hermes, Qwen Code, Kimi Code, Kiro, Amp, Droid, Goose, Vibe, Crush, Aider, Cline) side by side, per project, in real terminals with the user's own CLI installs and logins. The free plan has unlimited agents. Download: https://agentvera.dev/en/download/ · Pricing: https://agentvera.dev/en/pricing/
