[Windows] NUL-corrupted state wipes projects and backup

Open 💬 1 comment Opened Aug 15, 2026 by dovvnloading
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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?

  1. Start with a Codex profile containing multiple projects and project-linked chats.
  2. Close Codex, leaving the thread database intact.
  3. Make .codex-global-state.json invalid by filling it with NUL bytes.
  4. Launch Codex.
  5. Codex opens without an error and shows an empty Projects list.
  6. Create one test project and restart.
  7. Only the test project remains. Previous mappings are absent, and .bak contains 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.

View original on GitHub ↗

1 Comment

github-actions[bot] contributor · 12 days ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #37927

Powered by Codex Action