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.