Summary
After updating Codex Desktop on macOS on May 22, 2026, multiple local project conversation histories disappeared from the Codex Desktop UI. The underlying local data still exists in ~/.codex, including state_5.sqlite, session_index.jsonl, and the original rollout JSONL files under sessions/ and archived_sessions/. The issue appears to be a UI/sidebar/project-history indexing or migration bug rather than data deletion.
Environment
- Product: Codex Desktop App
- Platform: macOS
- Codex Desktop version observed in process metadata:
26.519.22136
- Time of update/problem: May 22, 2026, Asia/Shanghai timezone
- Local Codex directory:
~/.codex
User-Visible Impact
The following projects no longer show their expected conversation history in Codex Desktop:
/Users/<user>/Documents/code/project_244
/Users/<user>/Documents/code/project_466
- Potentially also affected:
/Users/<user>/Documents/code/project_A
/Users/<user>/Documents/code/project_B
/Users/<user>/Documents/code/project_C
The conversations are important because they contain project-specific debugging, automation, data-processing, and research workflow context.
Evidence That Data Still Exists
Local database and rollout files still contain the missing threads.
state_5.sqlite
Query:
select id, cwd, title, archived, rollout_path
from threads
where cwd in (
'/Users/<user>/Documents/code/project_244',
'/Users/<user>/Documents/code/project_466'
)
order by updated_at desc;
Observed results include:
Counts
state_5.sqlite contains 153 threads.
- The rollout JSONL files under
sessions/ and archived_sessions/ also total 153 files.
session_index.jsonl had only 100 entries after update, which suggested an incomplete or stale index. Rebuilding it to 154 lines did not restore UI visibility.
Suspicious Migration/UI State Details
~/.codex/.codex-global-state.json contains:
electron-saved-workspace-roots including:
/Users/<user>/Documents/code/project_244
/Users/<user>/Documents/code/project_466
/Users/<user>/Documents/code/project_A
/Users/<user>/Documents/code/project_B
But project-order was truncated and only contained paths up to:
"/Users/<user>/Documents/code/project_244"
The following saved roots were missing from project-order after the update:
/Users/<user>/Documents/code/project_A
/Users/<user>/Documents/code/project_C
/Users/<user>/Documents/code/project_B
/Users/<user>/Documents/code/project_466
Manually adding them back did not restore visibility. Codex Desktop also appeared to rewrite .codex-global-state.json from an in-memory or separate persisted state on restart.
Attempted Workarounds
The following local recovery attempts were made after a full backup of ~/.codex:
- Backed up the full
~/.codex directory.
- Added missing saved workspace roots back into
project-order.
- Rebuilt
session_index.jsonl from state_5.sqlite.
- Added all non-archived threads to
projectless-thread-ids.
- Temporarily locked
.codex-global-state.json with macOS uchg to prevent overwrite during restart, then removed the lock.
- Investigated
thread_source:
- Newer visible-looking threads often had
thread_source='user'.
- Older missing project threads had
thread_source set to NULL.
- Updated 51 non-archived, non-automation old local threads from NULL to
user.
None of these restored the missing conversations in the Codex Desktop UI.
Relevant Related Public Issues
These GitHub issues appear related:
Expected Behavior
Codex Desktop should display all non-archived local threads whose cwd points to saved workspace roots. For the affected projects, it should show at least:
- 2 non-archived threads under
/Users/<user>/Documents/code/project_244
- 1 non-archived thread under
/Users/<user>/Documents/code/project_466
Archived threads should remain visible through the archived/history view.
Actual Behavior
The affected project conversation histories are not visible in the Codex Desktop UI after the update, even though local SQLite rows and rollout JSONL files exist and remain readable.
Requested Help
Please advise how to repair or rebuild the Codex Desktop conversation sidebar/project-history index for existing local threads. If this is a known migration bug in Codex Desktop 26.519.22136, please provide:
- A supported recovery procedure.
- Whether
state_5.sqlite, session_index.jsonl, .codex-global-state.json, or app-server state is authoritative for the Desktop UI.
- Whether there is a command to force a full local history reindex/backfill.
- Whether a fixed version is available or planned.
Attachments / Logs Available On Request
The user can provide:
- A redacted copy of
~/.codex/state_5.sqlite
- A redacted copy of
~/.codex/session_index.jsonl
- Selected redacted rollout JSONL files for the affected thread IDs
~/.codex/.codex-global-state.json
logs_2.sqlite excerpts
Please note that some files may contain private conversation content, local paths, and authentication-related metadata. Redaction guidance would be appreciated.
Summary
After updating Codex Desktop on macOS on May 22, 2026, multiple local project conversation histories disappeared from the Codex Desktop UI. The underlying local data still exists in
~/.codex, includingstate_5.sqlite,session_index.jsonl, and the original rollout JSONL files undersessions/andarchived_sessions/. The issue appears to be a UI/sidebar/project-history indexing or migration bug rather than data deletion.Environment
26.519.22136~/.codexUser-Visible Impact
The following projects no longer show their expected conversation history in Codex Desktop:
/Users/<user>/Documents/code/project_244/Users/<user>/Documents/code/project_466/Users/<user>/Documents/code/project_A/Users/<user>/Documents/code/project_B/Users/<user>/Documents/code/project_CThe conversations are important because they contain project-specific debugging, automation, data-processing, and research workflow context.
Evidence That Data Still Exists
Local database and rollout files still contain the missing threads.
state_5.sqliteQuery:
Observed results include:
<thread_id_466_1>/Users/<user>/Documents/code/project_4660~/.codex/sessions/2026/03/19/rollout-2026-03-19T17-13-52-<thread_id_466_1>.jsonl<thread_id_244_1>/Users/<user>/Documents/code/project_2440~/.codex/sessions/2026/04/01/rollout-2026-04-01T09-04-49-<thread_id_244_1>.jsonl<thread_id_244_2>/Users/<user>/Documents/code/project_2440~/.codex/sessions/2026/03/27/rollout-2026-03-27T09-52-15-<thread_id_244_2>.jsonl<thread_id_244_archived_1>/Users/<user>/Documents/code/project_2441~/.codex/archived_sessions/rollout-2026-04-01T09-03-55-<thread_id_244_archived_1>.jsonlCounts
state_5.sqlitecontains 153 threads.sessions/andarchived_sessions/also total 153 files.session_index.jsonlhad only 100 entries after update, which suggested an incomplete or stale index. Rebuilding it to 154 lines did not restore UI visibility.Suspicious Migration/UI State Details
~/.codex/.codex-global-state.jsoncontains:electron-saved-workspace-rootsincluding:/Users/<user>/Documents/code/project_244/Users/<user>/Documents/code/project_466/Users/<user>/Documents/code/project_A/Users/<user>/Documents/code/project_BBut
project-orderwas truncated and only contained paths up to:"/Users/<user>/Documents/code/project_244"The following saved roots were missing from
project-orderafter the update:/Users/<user>/Documents/code/project_A/Users/<user>/Documents/code/project_C/Users/<user>/Documents/code/project_B/Users/<user>/Documents/code/project_466Manually adding them back did not restore visibility. Codex Desktop also appeared to rewrite
.codex-global-state.jsonfrom an in-memory or separate persisted state on restart.Attempted Workarounds
The following local recovery attempts were made after a full backup of
~/.codex:~/.codexdirectory.project-order.session_index.jsonlfromstate_5.sqlite.projectless-thread-ids..codex-global-state.jsonwith macOSuchgto prevent overwrite during restart, then removed the lock.thread_source:thread_source='user'.thread_sourceset to NULL.user.None of these restored the missing conversations in the Codex Desktop UI.
Relevant Related Public Issues
These GitHub issues appear related:
Codex Desktop bug report: recent conversation history hidden/stale despite local DB containing threads #21076
Windows Desktop: sidebar/project list lost after update; search still finds threads; projectless-thread-ids workaround restores flat chats but project grouping remains broken #19873
Desktop project sidebar hides active threads after state DB migration drift and stale temporary sessions #17304
Windows app: older local threads disappear from sidebar and sidebar search after restart while still present on disk #17540
Expected Behavior
Codex Desktop should display all non-archived local threads whose
cwdpoints to saved workspace roots. For the affected projects, it should show at least:/Users/<user>/Documents/code/project_244/Users/<user>/Documents/code/project_466Archived threads should remain visible through the archived/history view.
Actual Behavior
The affected project conversation histories are not visible in the Codex Desktop UI after the update, even though local SQLite rows and rollout JSONL files exist and remain readable.
Requested Help
Please advise how to repair or rebuild the Codex Desktop conversation sidebar/project-history index for existing local threads. If this is a known migration bug in Codex Desktop
26.519.22136, please provide:state_5.sqlite,session_index.jsonl,.codex-global-state.json, or app-server state is authoritative for the Desktop UI.Attachments / Logs Available On Request
The user can provide:
~/.codex/state_5.sqlite~/.codex/session_index.jsonl~/.codex/.codex-global-state.jsonlogs_2.sqliteexcerptsPlease note that some files may contain private conversation content, local paths, and authentication-related metadata. Redaction guidance would be appreciated.