[Windows] NUL-corrupted state wipes projects and backup
What version of the Codex App are you using (From “About Codex” dialog)?
26.810.4967.0
What subscription do you have?
Pro
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
All existing projects disappeared from the Codex App after startup.
At 07:18:45 on 2026-08-15, Codex loaded a NUL-filled .codex-global-state.json as empty state. It then saved the replacement project registry and copied it to .bak, overwriting the recovery backup without warning.
Existing chat rows and workspace folders remained on disk, but the project list and thread-to-project mappings were gone. Creating one test project produced a registry containing only that project; none of the previous chats were reattached.
This is persistent metadata loss, not a sidebar display or cache problem.
What steps can reproduce the bug?
- Start with a Codex profile containing multiple projects and project-linked chats.
- Close Codex, leaving the thread database intact.
- Make
.codex-global-state.jsoninvalid by filling it with NUL bytes. - Launch Codex.
- Codex opens without an error and shows an empty Projects list.
- Create one test project and restart.
- Only the test project remains. Previous mappings are absent, and
.bakcontains the replacement state instead of the last known-good registry.
Observed result: the registry changed from 8 projects / 65 assignments to 1 project / 0 assignments while the thread database retained approximately 1,070 rows.
What is the expected behavior?
Codex must treat an invalid global-state file as a recovery event, not as a valid empty registry.
It must stop automatic writeback, preserve the last known-good backup, warn the user, and restore or rebuild project mappings from durable records. It must never copy unvalidated replacement state over the recovery backup.
Additional information
Evidence:
- Codex App: 26.810.4967.0
- Windows: 10.0.26200.0 x64
- Last usable snapshot: 8 projects, 65 assignments
- Current registry: 1 test project, 0 assignments
- Thread database: approximately 1,070 rows
- Failure timestamp: 2026-08-15 07:18:45 local time
- Troubleshooting began afterward at 07:19:35
- No task, prompt, project-name, or conversation content is included
GitHub flags #37212 as related. This incident additionally records NUL corruption and overwrite of the recovery backup.
1 Comment
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action