Skip to main content
Claude Code connects to your IDE through a bidirectional bridge. Once connected, Claude has access to the files you have open, your editor’s context, and can display diffs directly in the IDE rather than the terminal.

Supported IDEs

  • VS Code (including Cursor and Windsurf)
  • JetBrains IDEs (IntelliJ IDEA, PyCharm, WebStorm, GoLand, and others)

Installing the extension or plugin

VS Code

Run /ide inside a Claude Code session. If Claude Code detects that VS Code is running but the extension is not installed, it will install the extension automatically.
Alternatively, install the Claude Code extension from the VS Code Marketplace and restart VS Code.

JetBrains

Run /ide inside a Claude Code session. If a supported JetBrains IDE is running, Claude Code will install the plugin. After installation, restart your IDE completely for the plugin to take effect.
You can also install the Claude Code plugin from the JetBrains Marketplace.
After installing the JetBrains plugin, a full IDE restart is required — not just closing and reopening the project. The plugin will not load until the IDE process itself restarts.

Connecting to an IDE

Once the extension or plugin is installed and your IDE is running, use /ide to connect:
Claude Code detects running IDE instances and shows a list. Select the IDE you want to connect to.
You can enable auto-connect so Claude Code connects to your IDE automatically on startup. Set this in /config or use the --ide flag when launching Claude Code.
What happens after connecting:
  • Claude Code establishes a local connection to the IDE
  • Claude can now read context from your open files and editor state
  • Diffs and file edits can be shown directly in the IDE’s diff viewer
Only one Claude Code instance can be connected to VS Code at a time. If you have multiple terminal windows running Claude Code, only one can be connected to the IDE at once.

What IDE integration adds

Once connected, Claude Code gains additional capabilities:

Open file context

Claude can see which files you have open in the IDE, providing relevant context without you needing to specify file paths explicitly.

Diff view in IDE

File changes Claude makes are shown in the IDE’s built-in diff viewer, so you can review and accept or reject edits inline.

Editor state awareness

Claude is aware of your current workspace folders, making it easier to understand multi-root workspaces.

Seamless switching

Start in the terminal, switch to the IDE to review changes, then return to the terminal — the session stays connected throughout.

Disconnecting from an IDE

Run /ide and select None from the list to disconnect. Claude Code will close the connection and stop receiving context from the IDE.

Opening the project in an IDE from Claude Code

If you want to open the current project (or a worktree) in a connected IDE, use the open argument:
Claude Code will show a list of connected IDEs and open the project directory in the one you select. For VS Code-based IDEs (VS Code, Cursor, Windsurf), this uses the code CLI command. For JetBrains IDEs, Claude Code will prompt you to open the path manually.

/desktop — hand off to Claude desktop app

If you want to continue your current terminal session in the Claude desktop app, use /desktop:
This command is available on macOS and Windows (x64). It transfers the current session to Claude Desktop so you can continue the conversation there.
/desktop is only available when you are signed in via claude.ai. It is not shown when logged in through the Anthropic API.

Syncing between terminal and IDE

Claude Code and the IDE stay in sync through the bridge connection. Here is how the typical workflow looks:
1

Start in the terminal

Open a Claude Code session in your project directory.
2

Connect to the IDE

Run /ide and select your IDE from the list.
3

Work in the terminal

Give Claude tasks as normal. File edits are written to disk and reflected in the IDE immediately.
4

Review changes in the IDE

Switch to your IDE to review the diff in the built-in viewer. Accept, reject, or manually adjust the changes.
5

Continue in the terminal

Return to the terminal and continue the session. Claude retains the full conversation context.