[Linux] Desktop app fails to launch when stale Codex SingletonLock points to a dead PID

Open 💬 2 comments Opened Aug 12, 2026 by jyoush

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.

View original on GitHub ↗

2 Comments

jyoush · 15 days ago

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:

  • The failure occurred when launching with the plain command chatgpt.
  • I did not pass --ozone-platform=wayland or any other Ozone/Wayland flag.
  • The desktop session itself was GNOME 50.1 / Mutter on Wayland, but this was the app's default launch path rather than an explicitly forced native-Wayland launch.
  • I did not capture the desktop About-screen version/build in the original console log.
  • The log does confirm that after removing the stale singleton files, the bundled Codex process launched from /usr/lib/chatgpt/resources/codex, reported app-server version 0.147.0-alpha.6.6, and the window reached ready-to-show.

The key failure remains unchanged:

  1. chatgpt refused to start because ~/.config/Codex/SingletonLock pointed to PID 199157.
  2. ps -fp 199157 showed the PID no longer existed.
  3. pgrep -af 'chatgpt|codex' showed no running ChatGPT/Codex process.
  4. SingletonSocket, SingletonLock, and SingletonCookie remained under ~/.config/Codex/.
  5. Removing those three stale singleton files immediately fixed launch.
  6. The initial failure also logged 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.

yuzhu-oai · 3 days ago

A fix has been merged and will take little time to reach production.
Thanks for the report!