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

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 ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗