Temporary workaround found
We were able to recover the desktop application by removing the persisted multi-root project entry from the Codex global state file.
The issue started after creating or selecting a project that contained more than one root folder. After that, Codex Desktop repeatedly reopened the same invalid project state during startup and crashed inside AppRoutes with:
Error: process is not defined
The affected state was stored in:
%USERPROFILE%.codex.codex-global-state.json
The temporary workaround was:
- Close all Codex Desktop processes.
- Create a backup of
.codex-global-state.json. - Open the file and locate the project entry containing multiple root paths.
- Remove the affected project from
local-projects. - Clear
selected-projectif it points to that project. - Remove only related workspace or writable-root references associated with the affected multi-root project.
- Validate that the edited file is still valid JSON.
- Reopen Codex Desktop.
- Add the repositories again as separate single-root projects.
Renaming the entire .codex-global-state.json file can also be used as a broader recovery method, but this resets the locally registered projects and some UI state. The project files themselves are not deleted.
This workaround restored access to the desktop application, but multi-root projects should be avoided until the underlying issue is fixed.
Using the bundled Codex executable for recovery
The Windows desktop installation also contains a bundled codex.exe that can be used from Command Prompt or PowerShell to inspect and repair the local state when the graphical interface is no longer accessible.
A more generic location is:
%LOCALAPPDATA%\OpenAI\Codex\bin\codex.exe
The build folder name may be different between installations or versions. It can be located with PowerShell using:
Get-ChildItem “$env:LOCALAPPDATA\OpenAI\Codex\bin” -Recurse -Filter codex.exe |
Select-Object FullName
Or from Command Prompt:
where /r “%LOCALAPPDATA%\OpenAI\Codex\bin” codex.exe
Once found, it can be launched directly:
“<full-path-to-codex.exe>”
We used this bundled executable to investigate the desktop logs and safely edit the persisted state while the desktop UI was stuck on the generic error screen.
Important: create a backup before editing .codex-global-state.json, and do not delete the actual project directories.
