codex - 💡(How to fix) Fix Fixed: share how to fix, Codex GUI failed to launch because it could not initialize its local SQLite state DB.

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

Screenshot error:

Root Cause

Codex GUI failed to launch because it could not initialize its local SQLite state DB.

Fix Action

Fix / Workaround

Workaround That Fixed It

RAW_BUFFERClick to expand / collapse

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

26.519.2081.0_x64

What subscription do you have?

chatgpt pro

What platform is your computer?

Windows 10 Enterprise

What issue are you seeing?

Summary

Codex GUI failed to launch because it could not initialize its local SQLite state DB.

Screenshot error:

Codex cannot access its local database. Database path: /mnt/c/Users/<user>/.codex/state_5.sqlite migration 1 was previously applied but has been modified

<img width="546" height="301" alt="Image" src="https://github.com/user-attachments/assets/381b10b6-aa45-4ce4-bb19-f899b09b1a8a" />

Environment

  • OS: Windows 10 Enterprise 10.0.26100.4652
  • Build lab: 26100.1.amd64fre.ge_release.240331-1435
  • Codex app: OpenAI.Codex_26.519.2081.0_x64__2p2nqsd0c76g0
  • WSL: 2.7.3.0
  • WSL kernel: 6.6.114.1-1
  • WSLg: 1.0.73

Likely Cause

Codex GUI had WSL mode enabled:

  • runCodexInWindowsSubsystemForLinux = true
  • active workspace root was under \\wsl$\NixOS\...

Because of that, the Windows Codex home:

C:\Users\<user>\.codex

was accessed from WSL as:

/mnt/c/Users/<user>/.codex

The SQLite state DB then hit a migration mismatch:

migration 1 was previously applied but has been modified

Workaround That Fixed It

  1. Backed up .codex settings.
  2. Disabled GUI WSL mode:
    • runCodexInWindowsSubsystemForLinux = false
    • integratedTerminalShell = powershell
    • active workspace root reset to C:\Users\<user>
  3. Moved these SQLite files out of .codex:
    • state_5.sqlite*
    • logs_2.sqlite*
  4. Restarted Codex GUI.

Codex regenerated the SQLite DBs and launched successfully.

Notes

Please do not ask users to attach full .codex contents, since it may contain auth data and conversation history.

What steps can reproduce the bug?

as above

What is the expected behavior?

No response

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 Fixed: share how to fix, Codex GUI failed to launch because it could not initialize its local SQLite state DB.