Claude Code IDE integration: VS Code, JetBrains, and any editor
PLClaude Code connects to editors three ways: a VS Code extension with a graphical chat panel (also for Cursor and other forks), a JetBrains plugin that runs the claude CLI inside the IDE terminal, and the CLI in any editor’s terminal. Connected sessions share your selection, show edits in the IDE diff viewer, and read the IDE’s diagnostics.
This page is for developers who already have Claude Code working in a terminal and want it inside their editor. The usual pain: you copy file paths into the terminal, alt-tab to read a diff, and only notice the type error Claude introduced when you open the file ten minutes later. A connected IDE fixes all three, if you set it up with the right permission mode and verification habit.
What you’ll walk away with from IDE integration
Section titled “What you’ll walk away with from IDE integration”- The VS Code extension or JetBrains plugin installed, signed in, and confirmed with
/status. - A deliberate choice of starting permission mode, including the one setting the extension ignores in project files.
- Three copy-paste prompts: analyse a selection, fix a failing terminal command, and run a verification pass that uses the IDE’s own diagnostics.
- A recovery path for the eight failures people hit most in the first week.
Everything below was checked on 2026-09-26 against Claude Code 2.1.283 (claude --help) and the official VS Code and JetBrains guides, except the passages that name 2026-10-12, which were re-checked that day against Claude Code 2.1.296 and Anthropic’s pages.
Which Claude Code IDE integration should you use?
Section titled “Which Claude Code IDE integration should you use?”Pick by editor first, then by how much of the CLI you need.
| Your editor | Use | What you get | What you give up |
|---|---|---|---|
| VS Code, Cursor, or another VS Code fork | VS Code extension | Chat panel, inline diffs with per-change accept, plan review as a Markdown document, session history, checkpoints in the UI | Some slash commands, the ! Bash shortcut, and tab completion (run the CLI in the terminal for those) |
| IntelliJ IDEA, PyCharm, WebStorm, GoLand, PhpStorm, Android Studio | JetBrains plugin | The full CLI in the IDE terminal, IDE diff viewer, selection sharing, diagnostics | No graphical chat panel: the plugin runs claude in a terminal |
| Neovim, Emacs, Sublime Text, Zed, anything else | CLI in the editor’s terminal | Every CLI feature | No IDE diff viewer, selection sharing, or diagnostics tool; the editor reloads files from disk |
If you want a standalone window rather than an editor panel, the Claude Code desktop app is the alternative. The rest of this page covers the three editor routes.
Install the Claude Code VS Code extension
Section titled “Install the Claude Code VS Code extension”You need VS Code 1.94.0 or later and a paid Claude plan (Pro, Max, Team, or Enterprise) or a Claude Console account. If your organisation reaches Claude through Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry, finish authentication first, because the extension reads the same ~/.claude/settings.json.
-
Install the extension. In VS Code press
Cmd+Shift+X(macOS) orCtrl+Shift+X(Windows and Linux), search for Claude Code by Anthropic, and click Install. In Cursor, use the same search in its Extensions view. Other VS Code forks can install it from the Open VSX registry. -
Open a file, then click the Spark icon in the editor toolbar (top right). The icon only appears when a file is open. The Spark icon in the Activity Bar on the left opens the sessions list and is always visible.
-
Click Sign in and finish authorisation in the browser. If you use
ANTHROPIC_API_KEYfrom your shell and still see the sign-in screen, VS Code did not inherit your environment: quit it and relaunch from a terminal withcode .. -
Type
/statusin the prompt box. It shows the Claude Code version, account, model, and MCP servers for the session. Confirm the account and model are the ones you expect before you ask for any change. Typing/statusin the panel needs v2.1.280+; on older versions, runclaudein the integrated terminal and use/statusthere. -
Install the standalone CLI too, if you have not already, by following the installation guide. The extension bundles a private copy of the CLI for its panel but does not put
claudeon yourPATH, soclaudein the integrated terminal fails without the standalone install.
The extension and the CLI share ~/.claude/settings.json, your MCP servers, plugins, and conversation history. Run claude --resume in a terminal to continue a conversation you started in the panel.
Choose the permission mode the extension starts in
Section titled “Choose the permission mode the extension starts in”The mode indicator at the bottom of the prompt box shows how much Claude does without asking. From v2.1.283 (both release channels on 2026-10-12), new VS Code conversations start in Auto on every plan and provider, with a classifier reviewing actions instead of prompting you; on earlier versions that holds only on Pro, Max and Team. A model that auto mode does not support, such as the Sonnet 4.5 default on Microsoft Foundry, starts the conversation in Manual instead. The other modes are Manual (config value default: Claude asks before edits and most shell commands), Plan (Claude proposes a plan and waits; VS Code opens it as a Markdown document you can comment on), and Edit automatically (acceptEdits).
For your first week in a repository, prefer Manual or Plan. Manual shows every edit as a side-by-side diff with Accept this change and Reject this change buttons on each hunk (v2.1.275+), so you learn what the agent does before you delegate more. A diff with more than 100 changes opens without those buttons; treat that as a sign the step was too large and ask for a smaller one. To pin the starting mode, set it in your VS Code user settings:
{ "claudeCode.initialPermissionMode": "plan"}The extension starts each new conversation in the first of these that applies:
claudeCode.initialPermissionModefrom VS Code user settings (workspace values are ignored).- The mode you last picked from the indicator, if it was Manual, Edit automatically, or Auto. A pick of Plan applies to that conversation only.
permissions.defaultModefrom managed settings or~/.claude/settings.json.- The built-in default (Auto on v2.1.283 and later).
Two consequences catch people out. The setting does not accept auto: to start in Auto, leave it unset and pick Auto once from the indicator. And the extension never reads a project’s .claude/settings.json for the starting mode, so a team default committed there applies to terminal sessions only; a team that needs one mode everywhere sets it in managed settings. The configuration guide covers the terminal side and permission rules.
Give Claude context from the editor
Section titled “Give Claude context from the editor”A connected editor sends context you would otherwise paste by hand.
- Selection. Claude sees highlighted code automatically; the prompt box footer shows the line count. Press
Option+K(macOS) orAlt+K(Windows and Linux) to insert an explicit reference such as@app.ts#5-10. - Open file. The active file’s name is attached to each message. Turn off
claudeCode.attachOpenFileto send only your selection. - Files and folders. Type
@and part of a name; matching is fuzzy, so@authfindsAuthService.ts. End a folder with/(@src/components/). - Terminal output.
@terminal:NAMEincludes the output of the integrated terminal whose title isNAME, so Claude reads the stack trace without a copy-paste.
The panel withholds selected text from files matched by files.exclude, search.exclude, or .gitignore (with the default claudeCode.respectGitIgnore), sending at most the path. The CLI in the integrated terminal and the JetBrains plugin do not apply that filter. To keep a file such as .env out of every surface, add a Read deny rule for it in .claude/settings.json; a matching deny rule blocks both the selection and the open-file notice.
How do you verify the agent’s edits without reading every line?
Section titled “How do you verify the agent’s edits without reading every line?”The IDE connection gives Claude one tool the plain terminal lacks: mcp__ide__getDiagnostics, which returns the errors and warnings your editor’s language server shows (the Problems panel in VS Code, inspections in JetBrains). In JetBrains each call covers one file; in VS Code a call can cover one file or the whole Problems panel. Claude does not reliably call it after edits, so ask for it. Combine it with your test and type-check commands and you get a verification pass whose output you can check in seconds.
Then check the evidence, not the code: the Problems panel is empty for the changed files, the test command in the report actually ran (you can rerun it in the terminal), and the diff touches only the files you expected. In Manual mode you accept the diff; on a team the CI gate is the final sign-off. Protect the oracle explains how to stop an agent from “fixing” a failure by editing the test.
When a change goes wrong, rewind instead of repairing by hand. In the panel, hover over a message and choose Rewind code to here, Fork conversation from here, or Fork conversation and rewind code. In the CLI, run /rewind or press Esc twice on an empty prompt. Checkpoints track only Claude’s file-edit tools: changes made by Bash commands, by subagents (except a foreground forked skill), or by you outside Claude are not restored, so commit before large tasks and use git for those.
Set up the JetBrains plugin
Section titled “Set up the JetBrains plugin”The JetBrains plugin does not bundle the CLI. It runs claude in the IDE’s terminal and connects to it.
-
Install the CLI with the installation guide and run
claude --versionto confirm it is on yourPATH. -
In the IDE, open Settings → Plugins → Marketplace, install Claude Code [Beta] by Anthropic, and restart the IDE.
-
Open the IDE’s terminal in the project root and run
claude, or pressCmd+Esc(macOS) orCtrl+Esc(Windows and Linux). Log in on first run. From an external terminal, run/ideinside the session instead; it confirms with a message such asConnected to IntelliJ IDEA., and if the running IDE lacks the plugin, it installs it and asks you to restart the IDE. -
Run
/configand set Diff tool toautoso edits open in the IDE diff viewer. The entry only appears while the IDE is connected. -
Select a few lines and send a prompt. The transcript shows
⧉ Selected N lines from <file>when the selection reached Claude. Insert a file reference withCmd+Option+K(macOS) orAlt+Ctrl+K(Windows and Linux).
If the plugin shows “Cannot launch Claude Code” because claude lives somewhere the IDE cannot find, set the full path under Settings → Tools → Claude Code [Beta] → Claude command. On WSL, use wsl -d Ubuntu -- bash -lic "claude" with your distribution’s name. With JetBrains Remote Development, install the plugin on the remote host (Settings → Plugin (Host)), not on your laptop.
Use Claude Code in any other editor’s terminal
Section titled “Use Claude Code in any other editor’s terminal”Open the integrated terminal (Ctrl+` or Cmd+`) and run:
claudeInside VS Code’s terminal the CLI connects to the IDE automatically, with diff viewing and diagnostics. From an external terminal, run /ide inside the session, or start with claude --ide to connect on startup when exactly one IDE is available.
Run claude in the editor’s terminal split from the project root:
claudeClaude writes to disk and your editor reloads the buffers. There is no IDE connection, so ask Claude to run your compiler or linter instead of reading diagnostics. IDE and CLI coordination covers split-screen layouts and auto-reload hooks.
Extension or CLI: which features differ?
Section titled “Extension or CLI: which features differ?”| Feature | VS Code extension | CLI (any terminal, JetBrains plugin) |
|---|---|---|
| Commands and skills | A subset (type / to see them) | All |
| MCP server management | Yes, /mcp dialog | Yes, /mcp and claude mcp add |
| Checkpoints and rewind | Yes, hover menu | Yes, /rewind or Esc Esc |
| Plugin management | Yes, the /plugins dialog (/plugin opens the same one) | Yes, /plugin or claude plugin |
! Bash shortcut, tab completion | No | Yes |
| Parallel conversations | Tabs and windows (Cmd+Shift+Esc / Ctrl+Shift+Esc) | Separate terminals or worktrees |
Use the panel for day-to-day edits you want to review visually. Drop to claude in the integrated terminal for a CLI-only command; the conversation history is shared, so nothing is lost.
VS Code shortcuts and settings worth changing
Section titled “VS Code shortcuts and settings worth changing”| Shortcut (macOS / Windows and Linux) | Action |
|---|---|
Cmd+Esc / Ctrl+Esc | Toggle focus between editor and Claude |
Cmd+Shift+Esc / Ctrl+Shift+Esc | New conversation in an editor tab |
Option+K / Alt+K | Insert an @-reference to the current selection |
Ctrl+Option+F / Ctrl+Alt+F | Toggle Focus view (hide tool calls) |
Shift+Enter | New line without sending |
Settings live under Extensions → Claude Code (claudeCode.* in settings.json):
| Setting | Default | Change it when |
|---|---|---|
initialPermissionMode | unset | You want every new conversation to start in Manual or Plan |
preferredLocation | panel | You want Claude in the right sidebar (sidebar) |
useTerminal | false | You prefer the CLI interface inside the extension |
autosave | true | Rarely: it saves files before Claude reads or writes them |
useCtrlEnterToSend | false | You keep sending half-written prompts with Enter |
enableNewConversationShortcut | false | You want Cmd+N / Ctrl+N for a new conversation |
The extension can also drive Chrome for web testing through @browser (for example @browser go to localhost:3000 and check the console for errors) once the Claude in Chrome extension, version 1.0.36 or later, is installed. Turn Chrome on yourself with /chrome or claude --chrome: from v2.1.290 (both release channels on 2026-10-17), a project’s .claude/settings.json cannot turn it on, because a repository you check out must not be able to connect Claude to your browser (Claude in Chrome documentation, checked 2026-10-12).
When Claude Code’s IDE integration breaks
Section titled “When Claude Code’s IDE integration breaks”No Spark icon in VS Code. Open a file (a folder alone is not enough), check Help → About for 1.94.0 or later, and run Developer: Reload Window. The extension does not run in Restricted Mode. Disable other AI extensions such as Cline or Continue to rule out a conflict.
claude: command not found in the VS Code terminal. The extension’s bundled CLI is private. Install the standalone CLI and open a new terminal.
Cmd+Esc does nothing on macOS. On macOS Tahoe and later the system Game Overlay shortcut takes it. Clear it in System Settings → Keyboard → Keyboard Shortcuts → Game Controllers, or rebind Claude Code: Focus input in VS Code.
/ide says “No available IDEs detected”. Confirm the plugin or extension is enabled, restart the IDE fully, and start claude from the project root. On WSL2, the NAT network or Windows Firewall usually blocks the connection: allow the WSL2 subnet through the firewall, or set networkingMode=mirrored in .wslconfig (Windows 11 22H2 or later) and run wsl --shutdown.
Esc does not interrupt Claude in a JetBrains terminal. Under Settings → Tools → Terminal, clear Move focus to the editor with Escape.
A conversation starts in Manual when you expected Auto. Auto needs a supported model and no disableAutoMode in any settings file; a claudeCode.claudeProcessWrapper setup also starts in Manual, and so does a Manual pick carried over from an earlier conversation or a permissions.defaultMode in ~/.claude/settings.json. Run /status to see the model, then pick Auto from the indicator.
Rewind left files changed. The changes came from a Bash command, a subagent (other than a foreground forked skill), or an external edit, none of which checkpoints track. Run git status and git restore the files, then ask Claude to redo the step through its edit tools.
Claude never responds in the panel. Start a new conversation, then run claude in a terminal: the CLI prints the detailed error (usually authentication or network). The error recovery guide covers the rest.
Where to go next after IDE integration
Section titled “Where to go next after IDE integration”Using Codex or Cursor instead? See Codex setup and configuration for the Codex IDE extension and CLI, or Cursor setup and configuration for Cursor’s built-in agent.
Did this guide help you?
One tap, no sign-in.
What will you do with it?
How did it read?
What got in the way? Pick any that apply
Your role?
Thanks. I read every answer. Michał Jaskólski
Did this guide help?
One tap each. Close whenever you like.
no sign-in