[BUG] JetBrains plugin: IDE diff review not working on Windows (native terminal + PyCharm)

Resolved 💬 3 comments Opened Mar 27, 2026 by krzyssikora Closed Jun 1, 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?

The Claude Code JetBrains plugin does not show diff tabs in PyCharm when Claude Code is run from a native Windows terminal (Git Bash). The same setup works flawlessly on macOS (iTerm2 + PyCharm).

Expected behavior:
When Claude Code makes file changes from an external terminal, PyCharm should open a diff tab for review — as it does on macOS.

Actual behavior:
No diff tab appears in PyCharm. Changes are written directly to disk without IDE interception.

Environment:

  • OS: Windows 11 Pro 10.0.26200
  • PyCharm: 2025.3.1.1 (Build #PY-253.29346.308)
  • Claude Code: 2.1.85
  • Claude Code JetBrains plugin: 0.1.14-beta
  • Terminal: Git Bash (native Windows, not WSL)
  • Claude Code installed at: C:\Users\<user>\.local\bin\claude.exe

Plugin settings (Settings > Tools > Claude Code):

  • Claude command: C:\Users\<user>\.local\bin\claude.exe (also tried just claude)
  • Enable automatic Windows drive mapping: enabled
  • Enable automatic WSL localhost mapping: enabled
  • WSL localhost path: tried both empty and /mnt/c

Diagnosis:

  1. The plugin registers an IDE lock file at ~/.claude/ide/<port>.lock with correct content:

{
"workspaceFolders": ["/mnt/c/Users/<user>/Documents/..."],
"pid": 19384,
"ideName": "PyCharm",
"transport": "ws",
"runningInWindows": true,
"authToken": "..."
}

  1. Note: workspaceFolders uses WSL-style paths (/mnt/c/...) even though PyCharm is running natively on Windows.
  2. PyCharm log shows the plugin fails to initialize:

WARN - ClaudeCodeLongRunningSession - Failed to load available models
java.util.NoSuchElementException: List is empty.
at kotlin.collections.CollectionsKt___CollectionsKt.first(_Collections.kt:221)
at com.intellij.ml.llm.agents.claude.code.ClaudeCodeLongRunningSession$1.invokeSuspend(ClaudeCodeLongRunningSessio
n.kt:46)

  1. Claude Code in Git Bash sees the working directory as C:\Users\... (Windows-style), but the lock file registers

/mnt/c/Users/... (WSL-style). This path mismatch likely prevents Claude Code from finding/connecting to the plugin's
websocket server.

What was tried:

  • Setting Claude command to full path (C:\Users\<user>\.local\bin\claude.exe)
  • Setting WSL localhost path to /mnt/c
  • Running Claude Code from WSL instead of Git Bash (plugin still didn't intercept)
  • Symlinking ~/.claude from WSL to Windows ~/.claude (sessions couldn't be found due to path key mismatch)
  • Multiple PyCharm restarts

Suspected root cause:
The plugin appears to assume WSL paths even on native Windows. The "Failed to load available models" error suggests the plugin cannot execute the claude binary at all, and the WSL-style workspaceFolders in the lock file means a native Windows Claude Code session cannot match its working directory to the registered workspace.

What Should Happen?

When Claude Code makes file changes from an external terminal, PyCharm should open a diff tab for review — as it does on macOS.

Error Messages/Logs

WARN - ClaudeCodeLongRunningSession - Failed to load available models
  java.util.NoSuchElementException: List is empty.
      at kotlin.collections.CollectionsKt___CollectionsKt.first(_Collections.kt:221)
      at com.intellij.ml.llm.agents.claude.code.ClaudeCodeLongRunningSession$1.invokeSuspend(ClaudeCodeLongRunningSessio
  n.kt:46)

Steps to Reproduce

see in "What's wrong" section

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.85 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

_No response_

View original on GitHub ↗

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