codex - 💡(How to fix) Fix Windows Desktop WSL app-server fails to launch due to CRLF/LF SQLx migration checksum mismatch

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

error instead of a softer degraded state. Codex updates and then launches new version without issue or error message at launch

Root Cause

Root Cause Your state_5.sqlite was initialized/migrated with CRLF SQL migration bytes. The updated Desktop app is launching a WSL/Linux Codex app-server whose embedded migrations use LF bytes. SQLx migration checksums are byte-for-byte, so it treats the same SQL text with different line endings as “migration modified.”

RAW_BUFFERClick to expand / collapse

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

26.519.2081.0

What subscription do you have?

Pro

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

Upgraded Codex Desktop from Windows Store (with Codex Desktop app closed), fails to launch.

Codex CLI (not desktop app) says:

Root Cause Your state_5.sqlite was initialized/migrated with CRLF SQL migration bytes. The updated Desktop app is launching a WSL/Linux Codex app-server whose embedded migrations use LF bytes. SQLx migration checksums are byte-for-byte, so it treats the same SQL text with different line endings as “migration modified.”

Evidence:

  • Your DB _sqlx_migrations rows 1..31 all match sha384(CRLF(upstream migration SQL)).
  • The upstream rust-v0.131.0 migration files hash differently as LF.
  • Local Windows binaries embed CRLF migration text.
  • Local Linux/WSL binaries embed LF migration text.
  • Desktop logs show the failing app launches: C:\Users\xxx.codex\bin\wsl\7945a00f33bdc140\codex
  • That WSL binary is codex-cli 0.131.0, and it rejects the CRLF-checksummed DB at migration 1.

Why It Started Now Upstream commit 53a36fc1c changed app-server startup to hard-fail if the state DB cannot be opened. So this mismatch became a launch-blocking error instead of a softer degraded state.

Relevant upstream links:

Recovery Implication This is not DB corruption. It is a cross-platform migration checksum bug caused by line endings.

Now that we know all 31 checksums are CRLF-vs-LF only, a controlled repair path exists: update _sqlx_migrations.checksum from CRLF hashes to LF hashes for versions 1..31, after backup. That is still a DB edit, but it is much less scary now because the SQL content is semantically identical; only line endings differ. I would only do it against the live DB after testing the exact update on a copied backup and proving the updated copy opens with the failing WSL binary.

<img width="1104" height="624" alt="Image" src="https://github.com/user-attachments/assets/c633acc4-abf8-4c66-abb4-5e3a20767178" />

What steps can reproduce the bug?

Update Codex from Windows store, try to launch Codex

What is the expected behavior?

Codex updates and then launches new version without issue or error message at launch

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

codex - 💡(How to fix) Fix Windows Desktop WSL app-server fails to launch due to CRLF/LF SQLx migration checksum mismatch