Codex Desktop bug/workaround: project shows "No chats" but local threads still exist

I ran into a nasty Codex Desktop sidebar bug: my projects showed “No chats”, but ~/.codex/state_5.sqlite still had the active thread rows and SQLite integrity was OK.

The useful clue: pinned chats still showed. That suggested the data was alive and the UI/sidebar project index was broken.

I put together a small local recovery helper:

  • dry-run first
  • backs up ~/.codex before changes
  • rebuilds thread-workspace-root-hints from state_5.sqlite
  • rebuilds sidebar project ordering
  • optionally archives automation/subagent noise
  • optionally pins recent real project chats as a fallback

Repo:

Do not upload raw Codex sessions or private files when debugging this. Sanitized counts are enough for an initial bug report.

Hey @Donkodio, welcome to the forum.

Thanks for flagging this and sharing the workaround, that’s helpful for others running into the same thing.

I’ll surface this to the product team so they can take a closer look.

- Avinash