Bug: Opening files with IntelliJ IDEA fails with DirectoryLock CannotActivateException
Open 💬 0 comments Opened Jul 16, 2026 by ljjay
Description
I previously suggested adding support for opening files directly with local IDEs (such as IntelliJ IDEA and other applications). I noticed this capability has now been added, which is a very useful improvement.
However, when using Codex to open a file with IntelliJ IDEA on Windows, IntelliJ fails to start.
Error
IntelliJ IDEA shows:
Start Failed
Internal error
com.intellij.platform.ide.bootstrap.DirectoryLock$CannotActivateException:
Process "C:\Program Files\JetBrains\IntelliJ IDEA 2026.1.3\bin\idea64.exe" is still running and does not respond.
Screenshot attached in the original report.
Expected behavior
- Codex launches IntelliJ IDEA successfully.
- The selected file/project opens in the IDE.
Actual behavior
- IntelliJ IDEA startup fails.
- The file cannot be opened through the IDE integration.
Environment
- OS: Windows
- IDE: IntelliJ IDEA 2026.1.3
- Feature: Codex open file with external application / IDE integration
Possible cause
It looks like the launcher may start IDEA while an existing IDEA process or stale lock is detected, triggering IntelliJ's DirectoryLock protection.
Possible improvements:
- Detect an existing IntelliJ process before launching.
- Reuse an existing IDE instance when possible.
- Wait for IDE startup before sending the open-file command.
- Handle stale IDE locks/process states more gracefully.
Thank you for adding this feature. It will be very useful once this issue is resolved.