[BUG] IDE integration broken in v2.1.23+ - MCP server never connects - Affects Jetbrains IDEs on Windows

Resolved 💬 12 comments Opened Feb 4, 2026 by daveelton Closed Feb 11, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

CLion-Claude Code Integration - Windows Regression Bug Report

Date: 2026-02-04
Regression Introduced: v2.1.23
Last Working Version: v2.1.22
CLion Plugin Version: 0.1.14-beta
Platform: Windows 11 (PowerShell terminal)
Note: This issue is Windows-specific - the same setup works correctly on macOS.

Summary

IDE integration is broken in Claude Code v2.1.31 (and v2.1.29) on Windows. The IDE MCP server never attempts to connect, despite environment variables being correctly set.

Verified: Downgrading to v2.1.20 via npm restores IDE integration functionality.

Verified: Subsequent Upgrade to v2.1.23 via npm results in broken IDE integration functionality again.

Symptoms

  1. /ide command shows no IDEs to connect to (v2.1.31)
  2. CLion plugin shows "Cannot launch Claude Code" error
  3. Code changes only appear in terminal, not in CLion diff views
  4. Shift+Enter does not create new lines in prompt (v2.1.31 native installer)

Confirmed Working vs Broken

| Version | Install Method | IDE Connection | Shift+Enter |
|---------|----------------|----------------|-------------|
| 2.1.20 | npm | ✅ Working | ✅ Working |
| 2.1.22 | npm | ✅ Working | ✅ Working |
| 2.1.23 | npm | ❌ Broken | ❌ Broken |
| 2.1.29 | native (irm) | ❌ Broken | ❌ Broken |
| 2.1.31 | native (irm) | ❌ Broken | ❌ Broken |

Workaround

Install v2.1.22 via npm instead of using the native installer:

# Remove or rename native binary
mv $env:USERPROFILE\.local\bin\claude.exe $env:USERPROFILE\.local\bin\claude.exe.bak

# Install working version via npm
npm install -g @anthropic-ai/claude-code@2.1.22

Architecture Overview

How IDE Integration Should Work

┌────────────────────────────────────────────────────────────────┐
│ CLion + Claude Code Plugin (com.anthropic.code.plugin)         │
│                                                                │
│  1. Plugin starts WebSocket server on port (e.g., 62282)       │
│  2. When opening terminal, plugin sets environment variables:  │
│     - CLAUDE_CODE_SSE_PORT=62282                               │
│     - ENABLE_IDE_INTEGRATION=true                              │
│     - TERMINAL_EMULATOR=JetBrains-JediTerm                     │
│                                                                │
│  3. Plugin creates "Claude Code" terminal tab and runs `claude`│
└────────────────────────────────────────────────────────────────┘
                              ↕ WebSocket (authenticated)
┌────────────────────────────────────────────────────────────────┐
│ Claude Code CLI (running in terminal)                          │
│                                                                │
│  1. Detects ENABLE_IDE_INTEGRATION=true                        │
│  2. Writes lock file: ~/.claude/ide/<port>.lock                │
│     (contains: workspace, PID, transport, authToken)           │
│  3. Connects to plugin's WebSocket server as MCP server "ide"  │
│  4. Enables: diff views, diagnostics, file open, etc.          │
└────────────────────────────────────────────────────────────────┘

Environment Variables (set by CLion plugin)

| Variable | Purpose |
|----------|---------|
| CLAUDE_CODE_SSE_PORT | Port number for WebSocket/SSE server |
| ENABLE_IDE_INTEGRATION | Enables IDE integration features |
| TERMINAL_EMULATOR | Identifies terminal type (JetBrains-JediTerm) |
| TERM_SESSION_ID | Unique session identifier |

Debug Evidence (from logs)

Working Session (v2.1.20, npm)

MCP server "ide": Starting connection with timeout of 30000ms
MCP server "ide": Successfully connected to ws-ide server in 202ms
MCP server "ide": Connection established with capabilities: {"hasTools":true,...}

Broken Session (v2.1.31, native installer)

  • No "MCP server ide" entries in debug log
  • Environment variables ARE set correctly
  • Lock file IS created with valid content
  • WebSocket port IS listening (CLion process)

The CLI never attempts to connect to the IDE MCP server.

Environment Details

  • OS: Windows 11
  • Primary Shell: PowerShell (CLion terminal launches PowerShell by default)
  • Subagent Shell: Git Bash (Claude Code spawns subagents in Git Bash)
  • Native Claude Location: %USERPROFILE%\.local\bin\claude.exe
  • PATH: Correctly includes .local\bin in system PATH

The CLion plugin correctly:

  • Sets environment variables in terminal sessions
  • Runs WebSocket server on allocated port
  • Includes claude.exe location in PATH passed to terminal

Troubleshooting Steps Attempted

  1. ✅ Disabled WSL integration in plugin settings
  2. ✅ Cleared %USERPROFILE%\.claude\ide\ lock files
  3. ✅ Verified environment variables are set
  4. ✅ Verified WebSocket port is listening
  5. ✅ Verified claude.exe is in PATH
  6. ✅ Checked CLion logs for errors
  7. ✅ Restarted CLion completely
  8. Downgraded to v2.1.20 via npm - FIXED the issue
  9. ✅ Bisected using npm to find latest working version / first with issue.

File Locations (Windows)

| Item | Path |
|------|------|
| Native Binary | %USERPROFILE%\.local\bin\claude.exe |
| Lock Files | %USERPROFILE%\.claude\ide\ |
| Debug Logs | %USERPROFILE%\.claude\debug\ |
| Plugin JAR | %APPDATA%\JetBrains\CLion<version>\plugins\claude-code-jetbrains-plugin\lib\ |
| Plugin Settings | %APPDATA%\JetBrains\CLion<version>\options\claude-code-plugin-settings.xml |
| CLion Logs | %LOCALAPPDATA%\JetBrains\CLion<version>\log\idea.log |

Debug Log Analysis

To investigate, search debug logs at %USERPROFILE%\.claude\debug\<session-id>.txt for:

  • MCP server "ide" - IDE connection attempts (missing in broken versions)
  • ws-ide - WebSocket IDE connection
  • ENABLE_IDE - Environment detection

Plugin Settings Reference

Located at: %APPDATA%\JetBrains\CLion<version>\options\claude-code-plugin-settings.xml

<application>
  <component name="ClaudeCodePluginSettings">
    <option name="enableWindowsDriveMapping" value="false" />
    <option name="enableWslLocalhostMapping" value="false" />
  </component>
</application>

Related to bugs #22232 , #22774

What Should Happen?

  1. /ide command should show no IDEs to connect to
  2. CLion plugin should not show "Cannot launch Claude Code" error
  3. Code changes should appear in CLion diff views
  4. Shift+Enter should create new lines in prompt

Error Messages/Logs

Steps to Reproduce

On Windows with any Claude version 2.1.23 onwards, use a jetbrains IDE to open Claude.
Once open you will see a warning about Cannot launch claude code (despite it having run).
/ide will show that there is no ide detected.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.22

Claude Code Version

2.1.31

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

_No response_

View original on GitHub ↗

This issue has 12 comments on GitHub. Read the full discussion on GitHub ↗