◉CLAUDE LABJP
●SONNET 4.5 — Sonnet 4.5 was retired from the Claude API on 11/30. Calls now return an error. Move to Sonnet 5.5●PROJECTS — The Enterprise Analytics API now reports daily usage for the new projects experience (beta)●OPUS 4.5 — claude-opus-4-5 retires on 2027/1/22, 52 days from now. The replacement is claude-opus-5-5●LANGUAGE — Some users say Claude switches to another language mid-session while they write in English●NEW — New: Weekly usage looks like it jumped right after a plan upgrade? Check this first●COWORK — Handing Cowork a folder for the first time? Start with a task that only reads files●SONNET 4.5 — Sonnet 4.5 was retired from the Claude API on 11/30. Calls now return an error. Move to Sonnet 5.5●PROJECTS — The Enterprise Analytics API now reports daily usage for the new projects experience (beta)●OPUS 4.5 — claude-opus-4-5 retires on 2027/1/22, 52 days from now. The replacement is claude-opus-5-5●LANGUAGE — Some users say Claude switches to another language mid-session while they write in English●NEW — New: Weekly usage looks like it jumped right after a plan upgrade? Check this first●COWORK — Handing Cowork a folder for the first time? Start with a task that only reads files
Articles/Claude Code
⟐ Claude Code/2026-03-27Beginner

Claude Code × JetBrains — When It Is Installed but Nothing Happens in IntelliJ, PyCharm, and Android Studio

When Claude Code diffs won't open in a JetBrains IDE, /ide finds no IDE, or Esc won't interrupt: a symptom-first checklist based on the official docs as of November 2026, covering the two-part install, WSL2 networking, and a small script to check the connection.

claude-code135jetbrainsintellijwebstormpycharmideplugin3

The night the diff stayed in the terminal

I was tidying up some Kotlin in the Android version of my wallpaper app, inside Android Studio, when I asked Claude Code for a small refactor. The proposed change scrolled past in the terminal as + and - lines. The IDE's diff viewer never opened. The plugin was installed, and I had already restarted the IDE.

The cause was embarrassingly simple: I had launched claude from a separate macOS terminal app. The plugin connects automatically only to a claude running in the IDE's integrated terminal; from an outside terminal you have to connect explicitly with /ide. It wasn't a settings problem. It was an assumption about where I started the process.

This page is for anyone who wants Claude Code inside a JetBrains IDE — IntelliJ IDEA, PyCharm, WebStorm, Android Studio, and the rest — and wants to get from "installed but nothing happens" to a working setup in about five minutes, then fold it into daily work. Everything here was checked against the official JetBrains page on code.claude.com as of November 2026.

The one thing to know first: the CLI and the plugin are separate

The JetBrains plugin does not bundle Claude Code. It runs the claude command in the IDE's integrated terminal and connects it to a small MCP server the IDE hosts (the server is named ide). So setup always has two parts:

  1. Install the Claude Code CLI, so claude is on your PATH.
  2. Install the "Claude Code [Beta]" plugin from the JetBrains Marketplace and restart the IDE.

If claude isn't on the PATH, the plugin shows a "Cannot launch Claude Code" notification. When you see that, look at the CLI, not the plugin.

Setup, as of November 2026

1. Install the CLI

The official quickstart now leads with the native installer. The npm install -g route that an earlier version of this page recommended is still supported, but it's listed as an alternative.

# macOS / Linux / WSL (the quickstart's default)
curl -fsSL https://claude.ai/install.sh | bash
 
# Windows PowerShell
irm https://claude.ai/install.ps1 | iex
 
# Homebrew (does not auto-update; run brew upgrade yourself)
brew install --cask claude-code
 
# Confirm it worked: you should see a version number
claude --version

If you do use npm, the current docs require Node.js 22 or later, and they recommend upgrading with npm install -g @anthropic-ai/claude-code@latest rather than npm update -g, because npm update -g respects the semver range from the original install and may not reach the newest release. Don't install with sudo; an install that needs it can't update itself.

2. Install the plugin

  1. Open Settings → Plugins → Marketplace and search for Claude Code.
  2. Install "Claude Code [Beta]" (ID 27310 on plugins.jetbrains.com).
  3. Restart the IDE.

An older version of this page mentioned a claude code install-jetbrains command. I couldn't find it anywhere in the official docs, so I've removed it. The Marketplace is the supported route.

Any paid Claude plan (Pro, Max, Ultra, Team, or Enterprise) or a Claude Console account works, and no API key is needed. You'll be asked to log in the first time you run claude.

3. Connect

Run claude from the IDE's integrated terminal and the integration turns on by itself. If you prefer an external terminal such as iTerm2 or Windows Terminal, start claude and type /ide:

$ claude
> /ide
Connected to IntelliJ IDEA.

That confirmation line is the example from the official docs. Start claude from your IDE project root if you want it to see the same files the IDE does.

A small script to check the connection

When the diff viewer refuses to open, I've found it faster to look at the lock files than to stare at the IDE. Per the docs, the plugin writes ~/.claude/ide/<port>.lock each time the IDE starts, and the CLI uses the auth token in that file to connect to ws://127.0.0.1:<port>. If you set CLAUDE_CONFIG_DIR, the files live under its ide/ folder instead.

This script lists the lock files and checks whether each port answers. It never prints the token.

#!/usr/bin/env bash
# ide_check.sh — check the Claude Code <-> JetBrains plugin link (never prints the token)
dir="${CLAUDE_CONFIG_DIR:-$HOME/.claude}/ide"
ls "$dir"/*.lock >/dev/null 2>&1 || { echo "no lock: the IDE plugin is not running"; exit 1; }
for f in "$dir"/*.lock; do
  port="$(basename "$f" .lock)"
  keys="$(python3 -c 'import json,sys; d=json.load(open(sys.argv[1])); print(",".join(k for k in d if "token" not in k.lower()))' "$f" 2>/dev/null)"
  if (exec 3<>"/dev/tcp/127.0.0.1/$port") 2>/dev/null; then state="LISTEN"; else state="no answer (stale lock?)"; fi
  echo "port=$port  keys=[$keys]  127.0.0.1:$port -> $state"
done

Field names inside the lock file may change between versions, so the script only lists key names instead of assuming them. I tested it on Ubuntu 22.04 with bash 5.1 and Python 3.10, using two dummy lock files and a listener on only one of the ports:

port=50123  keys=[pid,ideName,transport]  127.0.0.1:50123 -> no answer (stale lock?)
port=50124  keys=[pid,ideName,transport]  127.0.0.1:50124 -> LISTEN

Three ways to read it:

  • "no lock" — the plugin isn't running. Check that it's enabled and that you restarted the IDE.
  • only "no answer" — leftover lock files from an IDE you already closed. Reopening the IDE writes a fresh one on a new port.
  • "LISTEN" but still no connection — look at where you launched the CLI (integrated terminal, or did you run /ide?), or at WSL2 networking.

Since the output above came from dummy files, treat the key names as an example, not a spec.

Troubleshooting table

I rearranged the messages from the official troubleshooting section so you can look them up by symptom.

Symptom (message you see)Likely causeHow to checkFix
"Cannot launch Claude Code" / clicking the icon gives "command not found"CLI not installed, or the IDE can't see it on the PATHRun claude --version in a terminal outside the IDESet the full path in Settings → Tools → Claude Code [Beta] → Claude command
Diffs show in the terminal, not the IDELaunched from an external terminal, or Diff tool set to terminalWhere you launched claude; the Diff tool entry in /configConnect with /ide and set Diff tool to auto
/ide says "No available IDEs detected"Plugin disabled, IDE not restarted, or WSL2 NAT / firewallRun ide_check.sh aboveFully restart the IDE; for WSL2, see the next section
Esc doesn't interrupt Claude; focus jumps to the editorThe JetBrains terminal uses Esc for "move focus to editor"Settings → Tools → TerminalUncheck "Move focus to the editor with Escape", or delete the "Switch focus to Editor" keybinding
Nothing works under Remote DevelopmentPlugin installed on the local clientThe plugin list on the remote hostInstall via Settings → Plugin (Host) on the remote host
Selection isn't shared for one particular fileA Read deny rule matches that filepermissions.deny in settings.jsonExpected if intentional; otherwise adjust the rule

The last row is a feature, not a bug. If you put a file such as .env behind a Read deny rule, neither its selected text nor the "open file" notice reaches Claude. I've come to rely on that.

When Esc didn't stop anything

Early on in Android Studio, Claude started heading off in the wrong direction and I pressed Esc. Nothing stopped. Focus moved to the editor, and the work kept running in the terminal. I hadn't approved the diff yet, so no harm done, but I still remember the moment my hands froze over the keyboard.

By default the JetBrains terminal uses Esc to return focus to the editor. The official fix is in Settings → Tools → Terminal: uncheck "Move focus to the editor with Escape", or open "Configure terminal keybindings" and delete "Switch focus to Editor".

Since then, the first thing I do in any new IDE setup is send Claude a harmless request and confirm that Esc actually interrupts it.

Prove you can stop it before you let it do more. I'd rather check the brakes before I admire the diff viewer.

"No available IDEs detected" on WSL2

Pairing a Windows JetBrains IDE with Claude Code inside WSL2 sometimes fails to connect. According to the docs, the usual culprits are WSL2's NAT networking or Windows Firewall (WSL1 shares the host network and isn't affected).

First, point the plugin's Claude command through WSL (replace Ubuntu with your distribution):

wsl -d Ubuntu -- bash -lic "claude"

If it still won't connect, there are two fixes:

ApproachWhat you doRequirementPick it when
Firewall rule (officially recommended)Find the subnet with hostname -I inside WSL and allow inbound traffic for itWorks on Windows 10You don't want to change your WSL2 networking mode
Mirrored networkingAdd networkingMode=mirrored to .wslconfigWindows 11 22H2 or laterOther tools also trip over localhost mismatches

For the firewall rule, run this in an elevated PowerShell. Replace 172.21.0.0/16 with the first two segments of your hostname -I address followed by .0.0/16.

New-NetFirewallRule -DisplayName "Allow WSL2 Internal Traffic" -Direction Inbound -Protocol TCP -Action Allow -RemoteAddress 172.21.0.0/16 -LocalAddress 172.21.0.0/16

For mirrored networking, add this to .wslconfig in your Windows user folder, run wsl --shutdown in PowerShell, and reopen both the IDE and Claude Code:

[wsl2]
networkingMode=mirrored

If you're unsure, start with the firewall rule. It's the officially recommended path, and undoing it means deleting a single rule.

The plugin also has an "Accept connections from all network interfaces" option. Turning it on makes the IDE's MCP port reachable from your local network over unencrypted ws://, token included. The docs say to use it only when loopback can't work, so even on WSL2 I reach for mirrored networking first.

Day-to-day use once it's connected

Selection and the open file travel with every prompt

While connected, the CLI attaches your current selection and the active file's path to each prompt. You'll see a ⧉ Selected N lines from <file> line in the transcript when it happens. That's why "this function" is enough.

If you queue a message while Claude is working, it keeps the selection you had when you pressed Enter. Selecting something else afterward won't change it — worth knowing before you wonder why.

Shortcuts

ActionMacWindows / Linux
Open or focus Claude CodeCmd+EscCtrl+Esc
Insert a file reference with a line range (e.g. @src/auth.ts#L1-99)Cmd+Option+KAlt+Ctrl+K
New line inside a prompt (enable in plugin settings; macOS only)Option+Enter—

Let Claude read the IDE's inspections

The plugin exposes one tool to the model, getDiagnostics, which returns the errors and warnings the IDE shows for a file. The docs are clear that Claude Code doesn't fetch diagnostics on its own after edits, so I ask for it in the request: "after the change, read the diagnostics for this file and tell me what's left."

If your organization allowlists MCP tools with a PreToolUse hook, note that this tool arrives as mcp__ide__getDiagnostics. It's hidden from /mcp, which makes it easy to miss.

Example: a Before/After you can review in one screen

I keep requests small enough that the diff fits on one screen. Select a Kotlin function like this, ask "don't return null — express not-found in the type," and the change opens as an IDE diff:

// Before
fun findWallpaper(id: Long): Wallpaper? {
    return cache[id] ?: repository.load(id)
}
 
// After (reviewed and accepted in the diff viewer)
sealed interface WallpaperResult {
    data class Found(val wallpaper: Wallpaper) : WallpaperResult
    data object NotFound : WallpaperResult
}
 
fun findWallpaper(id: Long): WallpaperResult {
    val hit = cache[id] ?: repository.load(id)
    return if (hit != null) WallpaperResult.Found(hit) else WallpaperResult.NotFound
}

When I let it update every when at the call sites in the same request, the diff ran across several screens and I lost track of what I'd approved. Now I split "change the type" and "fix the callers" into two requests.

Common misconceptions

MisconceptionWhat the docs say (November 2026)
Installing the plugin installs Claude CodeIt doesn't bundle the CLI. Install the CLI separately and make sure it's on the PATH
An external terminal connects automaticallyOnly the integrated terminal connects automatically. From outside, use /ide
No Diff tool entry in /config means something is brokenThe entry appears only while connected to the IDE. Connect first, then open /config

Separately, JetBrains announced Claude Agent for its own AI chat in September 2025. That's a different entry point from this plugin: it runs through a JetBrains AI subscription and doesn't share settings with the Claude Code CLI or plugin. For pricing and quotas there, JetBrains' own pages are the reliable source.

One safety note

The docs warn that in acceptEdits mode (and auto mode), Claude can modify IDE configuration files that the IDE may execute automatically, which can become a way around Bash permission prompts. Inside the IDE I keep edit approval manual and review each change in the diff viewer. Having a good diff viewer is exactly what makes manual approval feel cheap.

Where people get stuck next

Once connected, the most common next snag is "I added an allow rule and it still asks." I Added the allow Rule and the Prompt Still Appears — Reading Six Layers from /permissions walks through how to see which layer decided.

If there are files whose selection you never want shared, My read-deny rules never reached inside the folder I had allowed covers a trap in how deny rules are written. And if you're still deciding on the editor itself, Claude Code and Cursor: Stop Trusting Benchmarks, Measure on Your Own Repo may help.

Start by launching claude in the IDE's integrated terminal, sending one harmless request, and pressing Esc to make sure it stops. Once that works, the diff viewer will carry most of the rest.

Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

If you found this article helpful, a small tip ($1.50) would mean a lot to us. Your support helps keep this site ad-free and covers server and hosting costs.

Related Articles

⟐ Claude Code2026-08-28
A small script that catches invisible characters in plugin names before you install
Control characters and zero-width characters hiding in plugin or skill names are invisible in a terminal listing. I built six deliberately confusing names, compared what ls actually shows, and wrote a short check you can run before installing anything — plus an honest note on what that check misses.
⟐ Claude Code2026-11-10
How Far Behind Is Your Claude Code on the stable Channel? I Counted Published Versions Instead of Subtracting Numbers
Subtracting version numbers overstates the gap between stable and latest. Here is a short Python script that counts published versions from the npm registry, plus the channel settings worth knowing.
⟐ Claude Code2026-11-03
When Claude Code dies with a Bus error on a shared home directory, check this before you turn off auto-update
Why Claude Code crashes with a Bus error on an NFS-style shared home, how the official cleanup rule and update switches work, and two small scripts to check your setup.