[Linux] Desktop app fails to launch when stale Codex SingletonLock points to a dead PID
Summary
On Ubuntu 26.04, the ChatGPT/Codex Linux desktop app refused to launch because the Codex profile was reported as being in use by another process, even though the referenced PID no longer existed and no chatgpt or codex processes were running.
Removing only the stale Chromium/Electron singleton files under ~/.config/Codex/ immediately fixed the problem and the app launched successfully.
Environment
- Ubuntu 26.04 (Resolute Raccoon) x86_64
- Kernel: Linux 7.0.0-29-generic
- GNOME 50.1
- Mutter / Wayland
- CPU: AMD Ryzen 7 5800X3D
- GPU: NVIDIA RTX 3080
- Codex app-server after successful launch:
0.147.0-alpha.6.6 - Launch command:
chatgpt
Context: this occurred after updating the NVIDIA driver and rebooting. I do not know whether the driver update caused the stale lock; it may simply have coincided with an unclean app/session shutdown.
Actual behavior
Launching chatgpt failed with:
ERROR:chrome/browser/process_singleton_posix.cc:365] The profile appears to be in use by another Codex process (199157) on another computer (jyoush-To-Be-Filled-By-O-E-M). Codex has locked the profile so that it doesn't get corrupted. If you are sure no other processes are using this profile, you can unlock the profile and relaunch Codex.
ERROR:chrome/browser/ui/views/message_box_dialog.cc:200] Unable to show message box: Codex - The profile appears to be in use by another Codex process (199157) ...
The app exited instead of recovering or presenting a usable unlock flow.
Verification
The PID referenced by the lock did not exist:
$ ps -fp 199157
UID PID PPID C STIME TTY TIME CMD
No ChatGPT/Codex processes were running:
$ pgrep -af 'chatgpt'
$ pgrep -af 'codex'
$ pgrep -af 'chatgpt|codex'
The stale singleton files were still present:
/home/jyoush/.config/Codex/SingletonSocket
/home/jyoush/.config/Codex/SingletonLock
/home/jyoush/.config/Codex/SingletonCookie
Workaround that fixed it
rm -f ~/.config/Codex/SingletonSocket ~/.config/Codex/SingletonLock ~/.config/Codex/SingletonCookie
chatgpt
After removing those three files, the app launched normally. The bundled Codex process spawned and initialized successfully, including:
[StdioConnection] stdio_transport_spawned ... executablePath=/usr/lib/chatgpt/resources/codex
[AppServerConnection] Current reported app-server version: currentVersion=0.147.0-alpha.6.6
[AppServerConnection] Codex CLI initialized
[window-manager] window ready-to-show
Expected behavior
If the owner PID recorded by the singleton lock no longer exists, the Linux desktop app should detect that the lock is stale and recover automatically, or provide a working prompt/action to unlock the profile. It should not remain permanently unable to launch until the user manually deletes SingletonLock, SingletonSocket, and SingletonCookie.
Additional note
The log also shows Unable to show message box, so the intended recovery UI may itself be failing on Linux/Wayland.
2 Comments
Follow-up after OpenAI Support response
OpenAI's AI-assisted support asked two follow-up questions: whether the failing launch was an explicitly forced native-Wayland launch (for example
chatgpt --ozone-platform=wayland) or the default launch path, and for the ChatGPT desktop app About-screen version/build.My reply:
chatgpt.--ozone-platform=waylandor any other Ozone/Wayland flag./usr/lib/chatgpt/resources/codex, reported app-server version0.147.0-alpha.6.6, and the window reachedready-to-show.The key failure remains unchanged:
chatgptrefused to start because~/.config/Codex/SingletonLockpointed to PID199157.ps -fp 199157showed the PID no longer existed.pgrep -af 'chatgpt|codex'showed no running ChatGPT/Codex process.SingletonSocket,SingletonLock, andSingletonCookieremained under~/.config/Codex/.Unable to show message box, so the intended recovery/unlock UI was not usable.Support case: 13108676. I also requested escalation to a human Linux desktop support/engineering reviewer.
A fix has been merged and will take little time to reach production.
Thanks for the report!