Codex Windows app crashes on startup with "SqliteError: attempt to write a readonly database"

Open 💬 4 comments Opened Mar 8, 2026 by chenhongyuan1

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

26.305.950.0

What subscription do you have?

codex business

What platform is your computer?

Microsoft Windows NT 10.0.22631.0 x64

What issue are you seeing?

The Codex Windows desktop app crashes on startup with the following main-process error:

A JavaScript error occurred in the main process
Uncaught Exception:
SqliteError: attempt to write a readonly database

I already tried Repair, Reset, uninstalling, reinstalling, and deleting local app data.

I also checked the package container under:
C:\Users\<username>\AppData\Local\Packages\OpenAI.Codex_2p2nqsd0c76g0

The container appears to be writable because files such as:

  • Settings\settings.dat
  • Settings\roaming.lock
  • SystemAppData\Helium\User.dat
  • SystemAppData\Helium\UserClasses.dat

are created or updated successfully.

Windows Defender Controlled Folder Access is disabled, and I did not find evidence that Defender or AppLocker is blocking Codex.

However, the app still crashes before becoming usable, with:
SqliteError: attempt to write a readonly database

It looks like the app may be trying to open or create a SQLite database in an unexpected non-writable location, or there may be a startup bug in version 26.305.950.0.

<img width="415" height="350" alt="Image" src="https://github.com/user-attachments/assets/21a324be-4e80-45ab-b69a-8346d65e989f" />

What steps can reproduce the bug?

  1. Install the Codex Windows app from the Microsoft Store.
  2. Launch the app.
  3. Wait for startup to complete.
  4. A dialog appears immediately with:

"A JavaScript error occurred in the main process"
"SqliteError: attempt to write a readonly database"

I can reproduce this consistently after reinstalling the app.

What is the expected behavior?

The app should start normally and initialize its local state/database in a writable per-user location without crashing.

Additional information

I already tried Repair, Reset, uninstalling/reinstalling the app, and deleting local app data before reinstalling.

I checked the package container at:
C:\Users\<username>\AppData\Local\Packages\OpenAI.Codex_2p2nqsd0c76g0

The container is writable, because files such as Settings\settings.dat, Settings\roaming.lock, SystemAppData\Helium\User.dat, and SystemAppData\Helium\UserClasses.dat are created or updated successfully.

Windows Defender Controlled Folder Access is disabled, and I did not find evidence that Defender or AppLocker is blocking the app.

No app-local .db, .sqlite, .sqlite3, or .ldb file appears to be created before the crash, which suggests the app may be opening SQLite from an unexpected non-writable location or hitting a startup bug in version 26.305.950.0.

View original on GitHub ↗

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