[BUG] Jetbrains Plugin cannot connect properly on WSL
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?
When starting Claude Code in IntelliJ on my WSL2 Host with a project within the WSL (Ubuntu), it launches a Terminal and starts Claude Code, but reports "Cannot launch Claude Code". Trying to inject current context etc. always starts new terminals with new claude instances.
<img width="1862" height="373" alt="Image" src="https://github.com/user-attachments/assets/60d5144e-4c5a-46b3-bd5f-db6cb3aecbfe" />
What Should Happen?
The plugin should recognize that it successfully started claude and use the running instance to enter context etc.
Error Messages/Logs
Steps to Reproduce
- Use IntelliJ installed on the Windows System (WSL2 Host)
- Open a project located within the Ubuntu WSL2
- Use the previously installed Claude Code plugin with default settings
- try to open claude code through the plugin (e,g. toolbar button)
- Terminal succesfully opens and starts Claude Code, shortly after the error message will appear
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.97 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
IntelliJ IDEA terminal
Additional Information
I have setup the firewall rule as explained in https://code.claude.com/docs/en/troubleshooting#wsl2-networking-modes, but that makes no difference (as expected).
I did try changing the start command as explained in https://code.claude.com/docs/en/jetbrains#general-settings, but that is actually worse because IntelliJ runs the command through the terminal directly within WSL, so it's actually the wrong command. claude works just fine, it's just that the plugin does not recognize the running instance.
<img width="738" height="758" alt="Image" src="https://github.com/user-attachments/assets/0b7607f9-d4ef-4388-b2e6-76d68b4bebf8" />
Switching to the "classic" Terminal Engine in Settings does not solve the problem, instead the claude command seems to be no longer getting properly passed over, claude no longer launches at all.
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗