Skip to content

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

Closed

Description

@latentflip

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

Activity

  1. added
    appIssues related to the Codex desktop app
    on May 21, 2026
  2. added
    bugSomething isn't working
    app-serverIssues involving app server protocol or interfaces
    on May 21, 2026
  3. github-actions commented on May 21, 2026

    @github-actions
    Contributor
  4. etraut-openai commented on May 21, 2026

    @etraut-openai
    Contributor

    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.

  5. AS-1-Dev commented on Aug 17, 2026

    @AS-1-Dev

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appapp-serverIssues involving app server protocol or interfacesbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions