Solo Stack Kits Directory
Claude Code workflows & skills for solo consultants and freelancers

← Blog · 2026-10-23

Claude Code Not Connecting to VS Code or JetBrains? 12 Causes and Fixes

30-second test: open your IDE's own integrated terminal in the project root, run claude, then type /ide. If it connects there but not from your usual terminal, skip to causes 1 and 3. If it fails even there, start at cause 2.

The Claude Code IDE integration is a small local connection between the claude CLI and an extension (VS Code) or plugin (JetBrains). When it works, Claude's proposed edits open in the IDE's diff viewer, your current selection and open file are sent with each prompt, and Claude can read the IDE's errors and warnings. When it doesn't, everything still runs as if you had no IDE, which is why it's easy to miss.

First: is it connected at all?

Run /ide inside Claude Code. It manages IDE integrations and shows their status. In JetBrains a working connection confirms with a message like Connected to IntelliJ IDEA., and a failure says No available IDEs detected. While connected, prompts you send with text selected show a ⧉ Selected N lines from line in the transcript. /doctor runs a setup checkup that includes extensions.

/ide finds nothing: 5 causes

  1. You started Claude from an external terminal. Claude Code connects automatically only when you launch it inside a supported IDE's integrated terminal. From Terminal.app, iTerm, Windows Terminal and so on, it doesn't connect unless you ask. Run /ide after starting, start with claude --ide (it connects on startup if exactly one valid IDE is available), or turn on Auto-connect to IDE (external terminal) in /config. That entry is the autoConnectIde key, which defaults to false and lives in ~/.claude.json, not settings.json.
  2. The extension or plugin isn't installed or enabled. For VS Code, running claude in its integrated terminal installs the extension for you, unless you turned that off with autoInstallIdeExtension: false in ~/.claude.json or CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL=1. For JetBrains, install the Claude Code plugin from the JetBrains Marketplace and restart the IDE. If /ide detects a running JetBrains IDE without the plugin, it installs it and asks you to restart. Check that the plugin is enabled, and restart the IDE completely (the docs say you may need to do this more than once).
  3. tmux (or another layer) hides the IDE terminal. Auto-detection can fail when tmux obscures the parent terminal. Set CLAUDE_CODE_AUTO_CONNECT_IDE=true to force a connection attempt. Set it to false to stop auto-connect; either way it overrides autoConnectIde.
  4. You started Claude in a different folder. Start Claude Code from the same directory as your IDE project root so both see the same files.
  5. The CLI can't validate the IDE's lock file. Each IDE session writes a fresh auth token to ~/.claude/ide/.lock, or to $CLAUDE_CONFIG_DIR/ide/ if CLAUDE_CONFIG_DIR is set, and the CLI must present that token to connect. If you use CLAUDE_CONFIG_DIR, set it the same way for the IDE and your terminal. If auto-connect still can't find an IDE you know is running, CLAUDE_CODE_IDE_SKIP_VALID_CHECK=1 skips validation of the lock file entries during connection.

WSL, remote hosts and containers: 3 causes

  1. WSL2 networking blocks the connection (JetBrains). With Claude Code on WSL2 and the IDE on Windows, "No available IDEs detected" usually means WSL2's NAT networking or Windows Firewall is in the way. WSL1 isn't affected. The recommended fix: run hostname -I in WSL, turn the address into a /16 subnet (for 172.21.123.45, use 172.21.0.0/16), then in an Administrator PowerShell run 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 and restart both the IDE and Claude Code. On Windows 11 22H2 or later you can instead add networkingMode=mirrored under [wsl2] in .wslconfig and run wsl --shutdown. Set the plugin's Claude command to wsl -d Ubuntu -- bash -lic "claude" (with your distribution name). CLAUDE_CODE_IDE_HOST_OVERRIDE sets the IDE host address by hand if auto-detection gets it wrong. Avoid the plugin's Accept connections from all network interfaces setting unless loopback can't work: it sends the session and token across your network in cleartext.
  2. JetBrains Remote Development: the plugin is on the wrong machine. Install it on the remote host via Settings → Plugin (Host), not on your local client.
  3. Dev containers: Claude runs inside the container. In a dev container, the terminal, language servers and Claude Code all run inside the container, and in VS Code both the panel and claude in the terminal share the container's ~/.claude. The Claude Code dev container feature adds the VS Code extension when you open the container in VS Code or Codespaces; other editors ignore that part. After changing devcontainer.json, run Dev Containers: Rebuild Container from the Command Palette.

The extension or command won't start: 2 causes

  1. claude isn't on the PATH your IDE sees. The JetBrains plugin runs claude in the IDE's terminal and doesn't bundle its own copy, so without the CLI you get "Cannot launch Claude Code" or "command not found". Check with claude --version, or set the full path (for example /usr/local/bin/claude) in the plugin's Claude command under Settings → Tools → Claude Code [Beta]. The VS Code extension bundles a private CLI for its chat panel but doesn't add claude to your PATH, so to run claude in VS Code's terminal you need the standalone install. A terminal inside an editor takes its PATH from the editor, so quit and reopen the editor after installing. If claude still isn't found, Claude Code command not found walks through every PATH and install fix.
  2. The VS Code extension won't install or its icon is missing. You need VS Code 1.94.0 or later (Help > About) and permission to install extensions. In forks like Cursor, search for "Claude Code" in the Extensions view or install from the Open VSX registry. The Spark icon only shows in the Editor Toolbar when a file is open, the extension doesn't work in Restricted Mode (workspace trust), and other AI extensions can conflict. Run Developer: Reload Window, or click ✻ Claude Code in the Status Bar, which works with no file open.

Connected, but features are missing: 2 causes

  1. Diffs stay in the terminal. Where diffs open is the Diff tool setting in /config: auto opens them in the IDE's diff viewer, terminal keeps them in the terminal. The entry appears only while Claude Code is connected to the IDE, so run /ide first. The underlying diffTool key lives in ~/.claude.json, and Claude Code ignores it in settings.json. In the VS Code chat panel, check the permission mode too: in Auto or Edit automatically mode Claude edits most files without asking, so there's no side-by-side diff to review. Switch to Manual to see one before each edit.
  2. Selection or errors aren't shared. A Read deny rule for a file blocks both its selected text and the open-file notice, by design. In the VS Code chat panel, files matching files.exclude or search.exclude, or ignored by git while respectGitIgnore is on, send only their path. With Attach Open File off, the active file goes only with a selection. For errors, Claude has to call the diagnostics tool; in JetBrains it doesn't request diagnostics on its own after edits, so ask it to check. The built-in ide MCP server is hidden from /mcp; if a PreToolUse hook allowlists MCP tools, include mcp__ide__getDiagnostics (and, for the VS Code chat panel, mcp__claude-vscode__getDiagnostics). Our free permissions builder writes those allow and deny rules.

Still stuck?

In VS Code, run Claude Code: Show Logs from the Command Palette to read the extension's debug log. If MCP servers you added yourself are the problem rather than the IDE link, our MCP server not connecting guide covers them, and if a key like diffTool seems to do nothing, settings not applying explains which file each key belongs in. If the extension connects but Claude Code won't sign in, see login not working.


Facts on this page come from Anthropic's Claude Code docs on VS Code, JetBrains IDEs, development containers, troubleshooting, troubleshooting installation, the settings reference, environment variables, the CLI reference and the commands reference. This guide isn't affiliated with Anthropic.

Want it set up already? Claude Code Power Config Pack

Fixed it? Skip the next one with a tested Claude Code setup you can drop into any repo.

One install command that backs up your settings first. Checked against the official Claude Code docs. MIT licensed.

Launch price: $6 instead of $12 (code LAUNCH50, first 25 buyers, until Nov 10, 2026).

Get the Config Pack: $6 launch price

Prefer to build it yourself? Use the free Claude Code tools, no sign-up.