Codex Desktop on Windows repeatedly launches IntelliJ IDEA from project path click and triggers JetBrains DirectoryLock error
What version of the Codex App are you using (From “About Codex” dialog)?
26.513.40821
What subscription do you have?
pro
What platform is your computer?
_No response_
What issue are you seeing?
Environment:
- OS: Windows
- Codex Desktop: 26.513.40821
- Codex CLI/runtime: 0.131.0-alpha.9
- IntelliJ IDEA: 2025.3
- IDEA path: D:\IntelliJ IDEA 2025.3\bin\idea64.exe
- Project path: D:\workspace\xuanwu-contract-sign
Steps to reproduce:
- Open Codex Desktop on Windows.
- Configure/open target for the project path to IntelliJ IDEA.
- Click the project directory/path address in Codex.
- IDEA opens successfully if it is not already running.
- Click the same project directory/path address again while IDEA is already running.
Actual result:
Codex launches idea64.exe again and IntelliJ IDEA shows an internal error:
com.intellij.platform.ide.bootstrap.DirectoryLock$CannotActivateException:
Process "D:\IntelliJ IDEA 2025.3\bin\idea64.exe" is still running and does not respond.
Suppressed exceptions include:
java.net.SocketException: Invalid argument: bind
java.net.SocketException: Invalid argument: connect
Expected result:
If IntelliJ IDEA is already running for that project, Codex should either:
- activate/focus the existing IDEA window,
- use JetBrains Toolbox/IDE protocol safely,
- or avoid launching a second IDEA process from the project path click.
Additional findings:
- The IDEA process is alive and responding.
- Running
Start-Process "D:\IntelliJ IDEA 2025.3\bin\idea64.exe" "D:\workspace\xuanwu-contract-sign"twice from PowerShell did not reproduce the issue. - Simulating Node spawn with the same executable/path also worked.
- The issue appears specific to Codex Desktop's project path click/open-target flow or persisted open target state.
- Codex persisted state contains:
"open-in-target-preferences": {"global":"intellij","perPath":{"D:\\workspace\\xuanwu-contract-sign":"intellij"}}
- Changing the persisted JSON to fileManager can be overwritten by the running Codex app on exit/restart.
Impact:
Repeatedly clicking the project directory address in Codex causes a scary IntelliJ internal error and makes the Codex directory link unreliable when IntelliJ is selected as the open target.
What steps can reproduce the bug?
Codex Windows 客户端点击项目目录地址会重复启动 IDEA,而不是激活已有 IDEA,导致 IDEA 2025.3 报 DirectoryLock$CannotActivateException。这是 Codex 打开目标逻辑和 JetBrains 单实例机制的兼容问题。
What is the expected behavior?
_No response_
Additional information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗