Parallel Diff Window Mismatch in JetBrains Claude Integration
Bug Description Claude code Jetbrains integration (last version of both CLI and plugin), if you run several sessions (different project windows) in parallel sometimes the diffs will open in the wrong project window (so you can have a python project that will suddenly open a Java file from another project where CC was running).
Environment Info
- Platform: linux
- Terminal: pycharm
- Version: 1.0.3
- Feedback ID: d35256ed-950a-48ac-b9d8-8ca88fa1bf58
Errors Unrelated to the issue at hand
Thanks for the report!
If you see this happen again, can you check whether or not Claude Code is connected to the right IDE? We've noticed a bug that Claude Code is connecting to the wrong IDE (so the cwd of Claude Code doesn't match that of the project root directories).
Wanted to see if it's related to this issue
I checked and each instance of CC (started with the button in the toolbar) was showing the right project path. But it would still open in the wrong IDE window. Project 1 opens its diff in the right window Project 2 opens in project 1 window
The claude code instance CWD for both projects in /proc/[pid]/cwd points to the right directory as well.
Looking at ~/.claude/ide files:
➜ ide jq < 38079.lock
{
"workspaceFolders": [
"<project2>"
],
"pid": 8507,
"ideName": "IntelliJ IDEA",
"transport": "ws"
}
➜ ide jq < 38647.lock
{
"workspaceFolders": [
"<project1>"
],
"pid": 8507,
"ideName": "IntelliJ IDEA",
"transport": "ws"
}
So my guess is that it should remember which window of which project?
Note that my two projects are indeed running in the same IDE, just two different project sessions.
For the bug I reported between PyCharm and IntelliJ, indeed it may have been started in the wrong directory.
I guess we are talking about two different bugs now?
Ah cool, thanks for the info!
-
If it's between pycharm and intellij, then it's a different bug. I assume you used the
/idecommand to connect, and not through the button in the top right toolbar? It may be the case that the wrong ide was selected -
For the multiple project instances in pycharm, what exactly do you mean by that? Are they separate windows? Or are you using the full screen mode to fit multiple tabs in the same full screen session?
I can reproduce in both pycharm and intellij (each running all by themselves).
open two projects in intellij (or two in pycharm they both do that) open claude code in each window. exit claude code in one of the window and reopen it now you have increased chances of new diff tabs opening in the wrong project .
it is not happening all the time so it is a bit weird.
let me know if I can ask CC about details of which window it is connected to, happy to help debug that.
hey @bjonnh. We have submitted a fix for this in the 0.1.7-beta version of the plugin, which has been out for ~1 week now. When convenient, can you please update to the latest version and see if this is still happening to you?
This has not been happening for a while so I consider it fixed. Thanks for the quick turn-around and the great product.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.