ChatGPT Desktop Fails to Launch When Stale Codex Processes Lock the SQLite State Database
What version of the Codex App are you using (From “About Codex” dialog)?
26.707.31428
What subscription do you have?
Plus
What platform is your computer?
Window 2025 server
What issue are you seeing?
Description
AFTER AN AUTOMATIC UPDATE, The ChatGPT desktop app fails to launch and instead shows the startup error screen with the “Check for updates” button.
The underlying problem appears to be a locked SQLite state database caused by lingering ChatGPT/Codex-related background processes.
NOTE: This has happened to me at least 10 times. That's why I'm logging the issue.
Error shown by the app
The desktop app reports:
Codex app-server initialize handshake timed out
The visible screen only offers the “Check for updates” button, which makes the problem look like an update or installation issue.
Underlying error
Running the app-server directly from PowerShell:
cd C:\Users\Administrator\AppData\Local\OpenAI\Codex\bin
.\codex app-server --listen stdio://
produces:
ERROR codex_app_server: failed to initialize sqlite state db: failed to initialize state runtime at C:\Users\Administrator\.codex: pool timed out while waiting for an open connection
Workaround that fixed it
The app launched successfully after force-stopping the lingering background processes:
Get-Process *codex* -ErrorAction SilentlyContinue | Stop-Process -Force
Get-Process *chatgpt* -ErrorAction SilentlyContinue | Stop-Process -Force
Get-Process *node_repl* -ErrorAction SilentlyContinue | Stop-Process -Force
Get-Process *codex-computer-use* -ErrorAction SilentlyContinue | Stop-Process -Force
After those processes were stopped, the app-server started normally and the desktop app opened successfully.
Expected behavior
The desktop app should either:
- Detect and terminate stale background processes before starting the app-server, or
- Recover from the SQLite database lock automatically, or
- Display the actual SQLite/state-runtime error instead of only showing a generic handshake timeout with a “Check for updates” button.
Actual behavior
The app fails to launch, shows a generic startup/update screen, and does not reveal that the local SQLite state database is blocked by lingering processes.
Environment
- Windows
- User profile:
C:\Users\Administrator - State directory:
C:\Users\Administrator\.codex - App-server location:
C:\Users\Administrator\AppData\Local\OpenAI\Codex\bin - Desktop app currently branded as ChatGPT, while the underlying executable and directories still use the Codex name
- CPU Utilization 4%; Memory 49%. 16gb memory.
Feedback ID
no-active-thread-019f4c20-c5d4-7bd3-b6eb-7380da1b1878
What steps can reproduce the bug?
Usually after an automatic update codex closes the app and updates. It never restarts. When i restart it, the error occurs. The root may be the way the app tries to restart or perhaps it does not shut down cleanly for the update.
What is the expected behavior?
Startup should detect stale database connections and deal with it instead of failing.
Additional information
NOTE: This has happened to me at least 10 times. That's why I'm logging the issue. I don't do anything. The app just closes, updates, doesn't restart. When i restart it, the failure occurs.
When the app does not look open it's not in the system tray either.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗