Upgrading to the latest version corrupted logs_2.sqlite and codex app wouldn't restart

Resolved 💬 3 comments Opened May 21, 2026 by latentflip Closed May 21, 2026
💡 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)?

Version 26.519.22136 (3003)

What subscription do you have?

Pro plan

What platform is your computer?

Darwin 25.4.0 arm64 arm

What issue are you seeing?

I just updated the app to the latest version, and it wouldn't relaunch, just gave me this error:

The app cannot finish launching until its SQLite database is accessible. Database path: Path unavailable in app-server startup error Close other Codex applications, then click Retry to check whether access has been restored. Error: (code=1, signal=null). Most recent error: Error: failed to initialize sqlite state runtime under /Users/latentflip/.codex: failed to initialize state runtime at /Users/latentflip/.codex: error returned from database: (code: 26) file is not a database

I tracked it down to logs_2.sqlite being corrupted somehow. I renamed that and things seem to have started okay now.

What steps can reproduce the bug?

N/A I can't.

What is the expected behavior?

Updating the app shouldn't corrupt sqlite files.

Additional information

_No response_

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 3 months ago

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

  • #23863
  • #23787

Powered by Codex Action

etraut-openai contributor · 3 months ago

The sqlite file was likely already corrupted prior to the upgrade. We were seeing intermittent reports of corruption with strange side effects. This version of the app now checks for corruption and reports it, which is why you just started to see this.

We're working on db auto-healing to eliminate this in most cases.

AS-1-Dev · 10 days ago

Hit this same failure mode on Windows and it reproduced the upgrade correlation described here — filed with full diagnostics as #39015.

~/.codex/logs_2.sqlite was corrupt (quick_check: Rowid ... out of order, COUNT(*) → database disk image is malformed), which made the app unlaunchable with Codex app-server initialize handshake timed out on every attempt. Every other database in CODEX_HOME passed quick_check cleanly, including state_5.sqlite.

The upgrade correlation:

  • Package upgraded OpenAI.Codex 26.707.8479.0 → 26.810.7004.0 (binaries dated 2026-08-16)
  • Crash dumps from the earlier build are still present, dated 2026-07-15
  • Same recovery as reported here — move logs_2.sqlite, -wal and -shm aside together and the app rebuilds an empty log DB

Given this reproduced on a second machine and a different version pair, the upgrade path may be where the corruption is actually introduced rather than it being incidental. Would be worth reopening, or linking to #39015 if you'd rather track it there.