JetBrains plugin: WebSocket connection drops immediately on Windows

Resolved 💬 3 comments Opened Apr 2, 2026 by xiaoqianyes Closed May 10, 2026

Environment

  • Claude Code: 2.1.90
  • OS: Windows 10 Pro 10.0.19045
  • IDE: Android Studio (JetBrains-based)
  • Terminal: Cygwin bash and cmd.exe (both fail)
  • Node.js: v24.14.0

Symptoms

  • /ide connects briefly then immediately disconnects
  • /status shows IDE: ✘ Not connected to Android Studio
  • Repeated /ide attempts cycle between:
  • "Failed to connect to Android Studio."
  • "Disconnected from Android Studio." (briefly connected)
  • "No IDE selected."

Diagnostics

All prerequisites are met:

  • ✅ Lock file exists at ~/.claude/ide/<port>.lock with correct Windows paths, pid, authToken
  • ✅ Environment variables injected: CLAUDE_CODE_SSE_PORT, ENABLE_IDE_INTEGRATION=true, TERMINAL_EMULATOR=JetBrains-JediTerm
  • ✅ Port is listening (TCP 0.0.0.0:<port> LISTENING)
  • ✅ HTTP GET to localhost:<port> returns 400 (expected pre-WebSocket-upgrade)
  • ✅ Node.js http.request succeeds
  • ✅ AS process alive and matching lock file pid

Steps to Reproduce

  1. Install Claude Code JetBrains plugin in Android Studio on Windows
  2. Open project, open integrated Terminal (cmd.exe or Cygwin bash)
  3. Run claude
  4. Type /ide → connects then immediately disconnects

Additional Notes

  • Tried both Cygwin bash and cmd.exe as AS Terminal shell — same result
  • Completely restarted Android Studio — same result
  • Lock file initially had Cygwin-style paths (/mnt/d/...), corrected to Windows paths via SessionStart hook — no change
  • The "Disconnected from Android Studio" response on 2nd attempt suggests WebSocket handshake succeeds but connection drops immediately after

View original on GitHub ↗

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