Windows desktop app exits after idle and cannot start until AppData\Local\OpenAI\Codex is recreated

Open 💬 3 comments Opened Jun 27, 2026 by lishaojiekao
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of the Codex App are you using (From “About Codex” dialog)?

26.616.10790.0

What subscription do you have?

ChatGPT Pro

What platform is your computer?

Microsoft Windows NT 10.0.19045.6159 x64

What issue are you seeing?

Summary

The Windows desktop app initially works normally.

After being left idle for several hours, the application exits by itself.

After that, every launch only shows the Loading screen briefly and then exits immediately.

The CLI continues to work normally.

Environment

  • Windows 10 22H2 (19045.6159)
  • Codex Desktop 26.616.10790.0
  • Installed from the official Codex download page
  • ChatGPT Pro

What I tried

None of the following resolved the problem:

  • Deleting ~/.codex
  • Deleting AppData\Roaming\Codex
  • Reinstalling the application
  • Deleting runtime subdirectories under AppData\Local\OpenAI\Codex
  • Restarting Windows

The CLI continued to work correctly throughout.

Workaround

The issue is consistently resolved by renaming:

C:\Users\<user>\AppData\Local\OpenAI\Codex

to another name (for example Codex_old).

After doing this, launching Codex recreates a fresh AppData\Local\OpenAI\Codex directory and the desktop application starts normally.

This workaround has worked every time the problem occurred.

Additional observations

  • No Codex.exe process remains running after the application exits.
  • Windows Event Viewer does not record an Application Error.
  • The desktop startup log always stops around:
browser_use_iab_backend_startup_started

with no further log entries.

  • Occasionally, Windows displays an error dialog for:
codex-windows-sandbox-setup.exe

with the message:

The specified module could not be found.

The executable is located under:

C:\Program Files\WindowsApps\OpenAI.Codex_26.616.10790.0_x64__2p2nqsd0c76g0\...

Deleting ~/.codex does not resolve the issue.

Recreating AppData\Local\OpenAI\Codex consistently restores the application.

Reinstalling the application alone does not reliably resolve the issue because the existing AppData\Local\OpenAI\Codex directory is preserved.

What steps can reproduce the bug?

The exact trigger is currently unknown, but this is the sequence that has happened multiple times:

  1. Install Codex Desktop.
  2. Use the application normally.
  3. Leave the application idle for several hours.
  4. The desktop application exits by itself.
  5. Every subsequent launch shows the Loading screen briefly and immediately exits.
  6. CLI continues to work normally.

The issue is consistently resolved by renaming:

C:\Users\<user>\AppData\Local\OpenAI\Codex

which causes Codex to recreate a fresh local runtime directory.

What is the expected behavior?

The desktop application should continue running while idle.

If local runtime state becomes invalid or inconsistent, Codex should either:

  • automatically repair the local runtime,
  • recreate the corrupted runtime state,
  • or display an actionable error message,

instead of exiting silently during startup.

Additional information

codex-desktop-e49867e7-0898-41f4-9808-595bb605dacd-17996-t0-i1-034148-0.log

<img width="476" height="374" alt="Image" src="https://github.com/user-attachments/assets/98d10329-0244-4add-a825-2dc16d461137" />

<img width="584" height="205" alt="Image" src="https://github.com/user-attachments/assets/1f04140f-f912-40f9-b12e-ea6eca77a46d" />

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 2 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #29593
  • #29585
  • #29952

Powered by Codex Action

lishaojiekao · 2 months ago

Update

I found a more precise timeline.

After reinstalling Codex, the app initially worked again.

At around 10:37, Windows AppXDeploymentServer automatically updated Codex from:

  • 26.616.10790.0

to:

  • 26.623.5546.0

The AppX deployment log confirms this package update.

During the update, the log also showed an error while deleting the previous package file:

app\icudtl.dat

A few hours later, Codex exited by itself again. After that, launching the app causes it to flash briefly and exit.

Current installed version is now:

26.623.5546.0

This seems different from #29593 because deleting ~/.codex did not resolve my issue. The failure appears correlated with the MSIX package update/migration from 26.616 to 26.623.

<img width="1782" height="688" alt="Image" src="https://github.com/user-attachments/assets/6f33f7dc-4e76-44a7-a43a-91533a59bfd9" />

lishaojiekao · 2 months ago

I found another important observation.

Resetting the Windows application from:

Settings → Apps → OpenAI Codex → Advanced options → Reset

restores the application.

After the reset, I restored my original ~/.codex directory, and Codex continued to work normally.

This suggests that ~/.codex is not the cause of the startup failure.

The reset recreates the MSIX application state under AppData\Local\Packages\OpenAI.Codex_*, which appears to be more closely related to the issue.