Repository navigation
Mac app stops showing local threads even though local thread data still exists #16095
Description
What version of Codex is running?
Codex Mac app 26.325.31654 (1272)
CLI on this machine is also:
codex-cli 0.118.0-alpha.2
What subscription do you have?
Pro
Which model were you using?
Not obviously model-specific. The issue is with the Mac app thread list itself.
What platform is your computer?
Darwin 25.3.0 arm64
What issue are you seeing?
The Codex Mac app stops showing my local threads and eventually reports effectively "no threads", even though the local thread data is still present on disk and in the local SQLite database.
This is not limited to one repository. It affects threads across many local repos.
I verified locally that the underlying data still exists:
~/.codex/state_5.sqlitestill contains 1176 threads, with 1170 unarchived- the corresponding rollout files are still present under
~/.codex/sessions - specific missing threads can still be found locally
So the problem appears to be the Mac app's thread enumeration / sidebar listing path, not actual deletion of local thread data.
What steps can reproduce the bug?
I do not have a minimal clean repro yet, but this is the observed failure mode on my machine:
- Use the Codex Mac app across multiple local repositories.
- Accumulate many local threads over time.
- Open the Mac app later and find that the sidebar no longer shows the local threads, even though they still exist in:
~/.codex/state_5.sqlite~/.codex/sessions/...
- Restarting the app does not restore them.
I also tried several recovery steps locally and none fixed the issue:
- Rebuild the local thread index by removing
~/.codex/session_index.jsonland~/.codex/state_5.sqlite* - Clear Codex app
Local StorageandSession Storage - Force local mode by setting:
codexCloudAccess = disabledenvironment = nullselected-remote-host-id = null
- Normalize thread titles in SQLite and recreate
session_index.jsonl - Rewrite thread
updated_atvalues and rebuild the index again
After all of that, the Mac app still did not repopulate the local thread list.
What is the expected behavior?
The Mac app should enumerate and show my existing unarchived local threads from the local Codex store instead of showing an empty or missing thread list.
If the local database and rollout files are intact, the sidebar should be able to recover from cache/index corruption and display those threads again.
Additional information
Relevant local evidence from this machine:
~/.codex/state_5.sqliterebuilds successfully and still contains:- 1176 total threads
- 1170 unarchived threads
- many recent active threads still exist locally, so this is not just stale historical data
- the missing threads are still present in rollout JSONL files under
~/.codex/sessions - one confirmed example is a previously missing thread that exists both in SQLite and in its rollout file
- after normalizing titles, there were no excessively long or multiline titles left in the DB, but the sidebar was still empty
- the app repeatedly restored a cloud environment / remote-host selection even after I cleared those values from local state
- fresh startup logs did not appear to request a normal
thread/listflow; they showedthread/resumefor the current session but not a full local thread listing pass
This looks like a Mac app bug in local thread discovery / sidebar rendering rather than actual thread loss.
Activity
github-actions commentedon Mar 28, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
neddes commentedon Mar 28, 2026
Additional evidence from local investigation on macOS
26.325.31654:thread/list, including workspace-scoped results and previously missing threads.~/.codex/state_5.sqliteand~/.codex/sessionsare not the failing layer here.I also found a request shape that reproduces the exact empty-sidebar symptom on my local data:
thread/list(..., cwd="<active-workspace-cwd>", sourceKinds=["cli"])=> empty resultthread/list(..., cwd="<active-workspace-cwd>", sourceKinds=["vscode"])=> expected missing threads appear immediatelyRelevant local data shape:
vscode=1130,exec=40first_user_message:0cwd:0openai=1170Additional client-state observation:
.codex-global-state.jsonkeeps reverting to a populatedselected-remote-host-idandcodexCloudAccess=enabledeven after resetting it to local-only.Recovery steps already tried with no fix:
session_index.jsonlandstate_5.sqliteLocal StorageandSession Storage~/Library/Application Support/Codexsession_index.jsonlupdated_atSo this now looks like a Desktop client-side history request/rendering bug. The app-server can list the threads correctly; the Mac client is either not issuing the right
thread/listrequest or is rendering from the wrong request/state.This seems closest to
#14370and possibly related to#15406. It does not look identical to the recent-subset / pagination variant in#14751/#15060, because even very recent workspace threads are absent here and theclivsvscodesource filter reproduces the empty state exactly.yahuo commentedon Apr 8, 2026
Additional evidence from a second macOS machine. This still looks like a Desktop sidebar / renderer bug, not local thread loss.
Environment
26.325.31654(1272)0.118.0-alpha.226.3.1 (25D771280a)onarm64Observed symptom
/Users/jinxin/Applications/OpenSource/claude-code, the left sidebar shows only the current thread under that project.Verified local data is intact
~/.codex/state_5.sqlitehas12unarchived threads for that exactcwd.12aresource='vscode'.~/.codex/sessions/....Verified backend / app-server is healthy
thread/listfor that exactcwd.12rows for the active workspace:thread/list({cwd=..., archived=false})thread/list({cwd=..., archived=false, sourceKinds=[]})thread/list({cwd=..., archived=false, sourceKinds=null})thread/list({cwd=..., archived=false, sourceKinds=["vscode"]})state_5.sqlite, rollout-file loss, orsourceKinds=[]by itself.Verified it is not the symlink / path-mismatch case
realpath(/Users/jinxin/Applications/OpenSource/claude-code)matches the opened workspace path exactly.Verified it is not just a hidden sidebar filter
sidebar-workspace-filter-v2 = allsidebar-organize-mode-v1 = projectMost suspicious renderer path so far
recent-conversations-metaquery / hook layer in the renderer, not reading SQLite directly.Bg(...)(current in-memory manager state) and then separately kicks an async refresh viaHg(...).thread/listreturns the full set.Local test patch candidate (lead, not confirmed root cause yet)
Vg(...).then(setQueryData(...))instead of only seeding fromBg(...)and fire-and-forgetHg(...).Net conclusion