codex - 💡(How to fix) Fix Desktop App startup crash due to sqlx migration checksum mismatch on logs_2.sqlite after updating to

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Misleading Error Context: Although the error window complained about /mnt/c/Users/Song/.codex/state_5.sqlite, the actual validation failure was occurring inside logs_2.sqlite's _sqlx_migrations table (both databases are initialized during the state runtime startup). Refine the exception propagation so the UI error message correctly specifies which database (logs_2.sqlite vs state_5.sqlite) actually failed the checksum verification. Steps to reproduce / Context: After updating the Codex Windows desktop application to version 26.519.2081.0, the app crashed on startup with a database initialization error. The error message displayed in the UI pointed to /mnt/c/Users/Song/.codex/state_5.sqlite: migration 1 was previously applied but has been modified.

Root Cause

Technical Findings (Root Cause):

RAW_BUFFERClick to expand / collapse

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

26.519.21041

What subscription do you have?

PLUS

What platform is your computer?

Win11

What issue are you seeing?

Crash on start like the pic.

Title: Desktop App

<img width="833" height="444" alt="Image" src="https://github.com/user-attachments/assets/7a37c198-7dad-4098-a370-363d11e8abd7" />

startup crash due to sqlx migration checksum mismatch on logs_2.sqlite after updating to 26.519.2081.0

Technical Findings (Root Cause):

Misleading Error Context: Although the error window complained about /mnt/c/Users/Song/.codex/state_5.sqlite, the actual validation failure was occurring inside logs_2.sqlite's _sqlx_migrations table (both databases are initialized during the state runtime startup). Checksum Mismatch: The migration checksums for migration 1 ('logs') and 2 ('logs feedback log body') stored in the local logs_2.sqlite differed from what the new CLI binary (0.131.0 spawned via WSL) expected. Local logs_2.sqlite hash for migration 1 (from previous versions): F477E605... New binary (0.131.0) expected hash for migration 1: 009639EA... Line Endings / Immutable Violation: This is likely caused by either modifying past migration files in the new release, or a mismatch in CRLF vs LF line endings during the build pipeline of the binary packages. Suggestions for OpenAI Dev Team:

Please ensure migration files are strictly treated as immutable across releases, and normalize line endings before calculating the migration hashes in the build pipeline. Refine the exception propagation so the UI error message correctly specifies which database (logs_2.sqlite vs state_5.sqlite) actually failed the checksum verification.

I have submitted this problem in the feedback of the APP.

This problem is solved by Gemini 3.5 Flash

What steps can reproduce the bug?

In-APP update.

Environment Details:

Codex Desktop UWP Version: 26.519.2081.0 (Package: OpenAI.Codex_26.519.2081.0_x64__2p2nqsd0c76g0) WSL CLI Binary version (active): 0.131.0 (Path: C:\Users\Song.codex\bin\wsl\7945a00f33bdc140\codex) Previous/Fallback WSL CLI version: 0.128.0-alpha.1 (Path: C:\Users\Song.codex\bin\wsl\codex) Windows Native CLI version: 0.131.0-alpha.9 (Path: C:\Users\Song\AppData\Local\OpenAI\Codex\bin\76ac88818493fc45\codex.exe) Active OS: Windows 11 running WSL 2 (Distro: Ubuntu) Steps to reproduce / Context: After updating the Codex Windows desktop application to version 26.519.2081.0, the app crashed on startup with a database initialization error. The error message displayed in the UI pointed to /mnt/c/Users/Song/.codex/state_5.sqlite: migration 1 was previously applied but has been modified.

What is the expected behavior?

launch normally

Additional information

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING