Codex threads disappear after a few days on macOS

Resolved 💬 2 comments Opened Apr 2, 2026 by nandishmr Closed Apr 2, 2026

What version of the Codex App are you using (From “About Codex” dialog)?

26.325.31654

What subscription do you have?

ChatGPT Plus

What platform is your computer?

Mac mini M4, macOS Tahoe 26.4, Darwin 25.4.0 arm64 arm

What issue are you seeing?

I’m seeing a repeatable issue where Codex threads disappear after a few days.

What I observed

  • Threads that previously existed later disappeared from the Codex app
  • This has happened more than once
  • The sidebar now shows no threads under my projects

What I verified locally

  • ~/.codex is a normal local folder
  • find ~/.codex/sessions -type f | wc -l returns 3
  • sqlite3 ~/.codex/state_5.sqlite "select count(*) from threads;" returns 3
  • ~/.codex/session_index.jsonl also contains 3 entries

So the local Codex store still has some records, but much less than expected, while the app shows no threads.

Why this looks like a bug
It looks like Codex may be:

  • losing local thread history over time
  • truncating/pruning local thread records
  • rebuilding local metadata from an incomplete source
  • or failing to surface locally stored threads correctly

Request
Can the team check whether Codex desktop on macOS is losing thread history after restart/update/time, especially for project/worktree-based threads?

What steps can reproduce the bug?

  1. Use Codex on macOS normally with project/worktree-based threads.
  2. Create and use multiple threads over time.
  3. Restart Codex and continue using it over the next few days.
  4. At some later point, previously visible threads disappear from the sidebar under projects.

Observed state after the issue:

  • Sidebar shows no threads under projects
  • Local Codex data still exists

Local checks performed:

  • find ~/.codex/sessions -type f | wc -l returned 3
  • sqlite3 ~/.codex/state_5.sqlite "select count(*) from threads;" returned 3
  • ~/.codex/session_index.jsonl also contained only 3 entries

This has happened more than once, but I do not yet have a guaranteed minimal repro sequence beyond normal use + time/restart.

What is the expected behavior?

Threads that were previously created in Codex should remain visible in the app unless they are explicitly deleted or archived by the user.

Restarting the app or continuing to use it over time should not cause thread history to disappear unexpectedly.

If local thread/session data still exists, the sidebar should surface it correctly.

Additional information

Environment:

  • Codex version: 26.325.31654
  • macOS version: Tahoe 26.4
  • System: Darwin 25.4.0 arm64 arm
  • Device: Mac mini M4

Notes:

  • This is not about cross-device sync
  • My concern is local threads disappearing on this machine
  • I verified ~/.codex is a normal local folder
  • I backed up ~/.codex before inspecting anything

Relevant local findings:

  • ~/.codex/state_5.sqlite exists
  • ~/.codex/session_index.jsonl exists
  • ~/.codex/sessions/ exists
  • Current local state shows only 3 session files, 3 DB thread rows, and 3 session index entries

This makes it look like Codex may be losing, truncating, or failing to surface local thread history over time.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗