You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Codex Windows App reported an error after upgrading: Codex cannot access its local database #23780
appIssues related to the Codex desktop appbugSomething isn't workingconfigIssues involving config.toml, config keys, config merging, or config updateswindows-osIssues related to Codex on Windows systems
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?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
What is the expected behavior?
No response
Additional information
No response
Reacted by Chris Owens, timothylam-edps, Panagiotis Tassias, Allen Koch, Román Via-Dufresne Saus, Jishnu Jayaraj, Dmitry Tsybizov, Albérico Dias Barreto Filho and Siyuan Liu
changed the title [-]The Codex Windows app crashes and becomes impossible to reopen after setting the agent environment and terminal environment to WSL and then closing the app[/-][+]Codex Windows App reported an error after upgrading: Codex cannot access its local database[/+]on May 20, 2026
This is the same root-cause family as #23777 / #23787: the WSL/Linux Codex backend rejects a Windows-created SQLite DB because SQLx migration checksums differ at the CRLF-vs-LF byte level. Moving state_5.sqlite* / logs_2.sqlite* aside is a launch workaround, but it forces Codex to rebuild metadata instead of repairing the existing DBs.
git clone https://github.com/xdifu/codex-repair.git
cd codex-repair
python codex-repair.py fix --apply
If you run it from WSL bash to repair Windows Codex Desktop data, pass --codex-home "/mnt/c/Users/<WindowsUser>/.codex" so it does not target WSL's own ~/.codex.
It backs up the SQLite DBs, extracts the active backend's expected checksums, schema-verifies before rewriting _sqlx_migrations, and leaves ~/.codex/sessions/*.jsonl read-only.
appIssues related to the Codex desktop appbugSomething isn't workingconfigIssues involving config.toml, config keys, config merging, or config updateswindows-osIssues related to Codex on Windows systems
Activity
github-actions commentedon May 20, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
[-]The Codex Windows app crashes and becomes impossible to reopen after setting the agent environment and terminal environment to WSL and then closing the app[/-][+]Codex Windows App reported an error after upgrading: Codex cannot access its local database[/+]migration 1 was previously applied but has been modified#23824 as a duplicate of this issuexdifu commentedon May 23, 2026
This is the same root-cause family as #23777 / #23787: the WSL/Linux Codex backend rejects a Windows-created SQLite DB because SQLx migration checksums differ at the CRLF-vs-LF byte level. Moving
state_5.sqlite*/logs_2.sqlite*aside is a launch workaround, but it forces Codex to rebuild metadata instead of repairing the existing DBs.For users who want to preserve local history metadata, I published a non-destructive repair tool: https://github.com/xdifu/codex-repair
Windows PowerShell / Windows Terminal:
If you run it from WSL bash to repair Windows Codex Desktop data, pass
--codex-home "/mnt/c/Users/<WindowsUser>/.codex"so it does not target WSL's own~/.codex.It backs up the SQLite DBs, extracts the active backend's expected checksums, schema-verifies before rewriting
_sqlx_migrations, and leaves~/.codex/sessions/*.jsonlread-only.