{"repo":"xdifu/codex-repair","free":true,"listed":false,"github":"https://github.com/xdifu/codex-repair","clone":"git clone https://github.com/xdifu/codex-repair.git","description":"Fix \"Codex cannot access its local database\" / \"migration 1 was previously applied but has been modified\" / \"timed out waiting for state db backfill after 30s\" on Codex Desktop (Windows/WSL/Mac/Linux) after the 0.130 → 0.131 update. CRLF/LF sqlx checksum drift in state_5.sqlite + logs_2.sqlite. Sessions preserved. See openai/codex#23787.","language":"Python","stars":34,"topics":["backfill","codex","migration","openai-codex","repair-tool","sqlite","sqlx","windows","wsl","chatgpt"],"license":"Apache-2.0","category":"databases-storage","readme_excerpt":"Codex Repair Toolkit Maintained by @xdifu . Issues + PRs welcome. Fix the \"Codex cannot access its local database\" crash on Codex Desktop after the 0.130 → 0.131 auto-update — without losing any conversations. If you just updated Codex Desktop on Windows (or macOS / Linux) and now see one of these dialogs: Codex cannot access its local database. The app cannot finish launching until its SQLite database is accessible. Database path: /mnt/c/Users/ /.codex/state 5.sqlite : failed to initialize state runtime at /mnt/c/Users/ /.codex Most recent error: Error: failed to initialize sqlite state db at /mnt/c/Users/ /.codex/state 5.sqlite: failed to initialize state runtime at /mnt/c/Users/ /.codex: migration 1 was previously applied but has been modified or, after the first symptom is patched, this one: An error has occurred Codex crashed with the following error: (code=1, signal=null). Most recent error: Error: failed to initialize sqlite state db at /mnt/c/Users/ /.codex/state 5.sqlite: timed out waiting for state db backfill at /mnt/c/Users/ /.codex after 30s (status: running) … you are in the right place. Both errors are OpenAI's bug, not your computer's (tracked upstream as openai/codex#23787 and #23777 ). This toolkit fixes them non-destructively, with full DB backups, SQLite schema verification, and dry-run by default . Your conversation history ( /.codex/sessions/ .jsonl ) is never touched. tl;dr On Windows, run this from PowerShell or Windows Terminal: If you prefer to call ","default_branch":null,"files":null,"tree":[],"storefront":"/r/xdifu","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/xdifu/codex-repair/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}