← 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.
/idefinds nothing: causes 1 to 5.- You're on WSL, a remote host or in a container: causes 6 to 8.
- The extension or
claudecommand itself won't start: causes 9 and 10. - Connected, but diffs, selection or errors are missing: causes 11 and 12.
/ide finds nothing: 5 causes
- 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
/ideafter starting, start withclaude --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 theautoConnectIdekey, which defaults tofalseand lives in~/.claude.json, notsettings.json. - The extension or plugin isn't installed or enabled. For VS Code, running
claudein its integrated terminal installs the extension for you, unless you turned that off withautoInstallIdeExtension: falsein~/.claude.jsonorCLAUDE_CODE_IDE_SKIP_AUTO_INSTALL=1. For JetBrains, install the Claude Code plugin from the JetBrains Marketplace and restart the IDE. If/idedetects 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). - tmux (or another layer) hides the IDE terminal. Auto-detection can fail when tmux obscures the parent terminal. Set
CLAUDE_CODE_AUTO_CONNECT_IDE=trueto force a connection attempt. Set it tofalseto stop auto-connect; either way it overridesautoConnectIde. - 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.
- 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/ifCLAUDE_CONFIG_DIRis set, and the CLI must present that token to connect. If you useCLAUDE_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=1skips validation of the lock file entries during connection.
WSL, remote hosts and containers: 3 causes
- 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 -Iin WSL, turn the address into a/16subnet (for172.21.123.45, use172.21.0.0/16), then in an Administrator PowerShell runNew-NetFirewallRule -DisplayName "Allow WSL2 Internal Traffic" -Direction Inbound -Protocol TCP -Action Allow -RemoteAddress 172.21.0.0/16 -LocalAddress 172.21.0.0/16and restart both the IDE and Claude Code. On Windows 11 22H2 or later you can instead addnetworkingMode=mirroredunder[wsl2]in.wslconfigand runwsl --shutdown. Set the plugin's Claude command towsl -d Ubuntu -- bash -lic "claude"(with your distribution name).CLAUDE_CODE_IDE_HOST_OVERRIDEsets 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. - 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.
- 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
claudein 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 changingdevcontainer.json, run Dev Containers: Rebuild Container from the Command Palette.
The extension or command won't start: 2 causes
claudeisn't on the PATH your IDE sees. The JetBrains plugin runsclaudein 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 withclaude --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 addclaudeto your PATH, so to runclaudein 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. Ifclaudestill isn't found, Claude Code command not found walks through every PATH and install fix.- 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
- Diffs stay in the terminal. Where diffs open is the Diff tool setting in
/config:autoopens them in the IDE's diff viewer,terminalkeeps them in the terminal. The entry appears only while Claude Code is connected to the IDE, so run/idefirst. The underlyingdiffToolkey lives in~/.claude.json, and Claude Code ignores it insettings.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. - Selection or errors aren't shared. A
Readdeny rule for a file blocks both its selected text and the open-file notice, by design. In the VS Code chat panel, files matchingfiles.excludeorsearch.exclude, or ignored by git whilerespectGitIgnoreis 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-inideMCP server is hidden from/mcp; if aPreToolUsehook allowlists MCP tools, includemcp__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.