Sessions flash then disappear after model_provider migration
## Symptoms
11 sessions flash briefly in the sidebar on startup, then disappear.
All data is confirmed intact in ~/.codex/sessions/, state_5.sqlite, and session_index.jsonl.
Logs show repeated errors:
state db missing rollout path for thread 019ea655...
state db discrepancy during find_thread_path_by_id_str_in_subdir: falling_back
## Verified (all correct)
- JSONL files exist, valid,
model_provider: "custom" state_5.sqlitethreadstable has matching recordsrollout_pathis absolute, file exists on disksession_index.jsonlentries present- Clearing
~/Library/Application Support/Codexand~/Library/Caches/Codex+ restarting does NOT fix
## Broken vs working session
Two sessions — structurally identical. One shown, one hidden:
| | Broken (019ecb90) | Working (019ecdba) |
|---|---|---|
| Lines | 150 | 107 |
| First line type | session_meta | session_meta |
| Last line type | event_msg | event_msg |
| All types | 4 same | 4 same |
| model_provider | custom | custom |
| File exists | ✅ | ✅ |
| stateDB record | ✅ | ✅ |
## Suspected cause
These sessions were migrated from model_provider: "openai" → "custom".
Codex may be performing an additional consistency check (backfill_state watermark, session hash, etc.) that fails for migrated sessions but passes for natively-created ones.
## Environment
- Codex Desktop v0.140.0-alpha.2
- macOS
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗