Codex Desktop hides existing workspace threads on macOS
Open 💬 9 comments Opened Mar 11, 2026 by mikebmod
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of the Codex App are you using (From “About Codex” dialog)?
Version 26.305.950 (863)
What subscription do you have?
Enterprise
What platform is your computer?
Darwin 25.3.0 arm64 arm
What issue are you seeing?
Codex Desktop on macOS only shows 1 thread for workspace but the local store contains 16 threads for that exact cwd, 15 active.
What steps can reproduce the bug?
Verified locally:
- ~/.codex/state_5.sqlite has 16 rows for cwd=/path/to/project
- raw rollout files exist under ~/.codex/sessions and ~/.codex/archived_sessions
- cache reset did not fix it
- full state rebuild did not fix it
- reinstalling Codex Desktop did not fix it
What is the expected behavior?
_No response_
Additional information
_No response_
9 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I can reproduce the same bug on macOS: Codex App shows only a small subset of workspace threads, while local data is intact.
Date: 2026-03-12
Platform: macOS (Darwin arm64)
CLI version on this machine:
codex-cli 0.111.0Workspace:
/Users/like/Desktop/ReportHubWhat I see
In Codex App UI, this workspace only shows 3 threads.
But local sqlite has many more rows for the exact same cwd:
I can reproduce this on the macOS desktop app and have a stronger signal for the failure mode.
App build on my machine:
26.311.21342(CFBundleVersion993)What I found locally:
~/.codex/state_5.sqlitethreads.title = first_user_messagetitlevalues were often the entire multiline opening prompt, not a short label3548and3877characters longRepresentative sqlite evidence:
Example previews from those malformed rows:
You are the review and verification agent for Linear ticket \TAL-33\...(3877chars)You are the review and verification agent for Linear ticket \TAL-31\...(3548chars)I manually normalized the stored titles to short single-line labels and rebuilt
~/.codex/session_index.jsonl; after that, the sidebar threads became visible again. But while the desktop app stayed open, it kept writing new bad rows.So this looks less like a generic "thread list filter" bug and more like a desktop app write-path bug where new threads are persisted with
title = first_user_messageinstead of a derived short title, which then breaks or degrades the sidebar listing path.If useful, I can also provide the exact normalization query/script I used as a temporary local workaround.
I have a stronger repro now. This does not look like data loss. It looks like the Desktop sidebar is effectively gated by local sqlite
updated_atordering/truncation.Environment:
/Users/like/Desktop/Trae/ReportHubLocal sqlite state for this exact workspace:
I have one additional macOS data point that may be relevant here.
In a few affected threads I checked locally, the raw rollout in
~/.codex/sessions/.../rollout-<thread-id>.jsonlstill contained the newer conversation, and the matching row in~/.codex/state_*.sqlitewas also current. But the derived metadata was stale:~/.codex/session_index.jsonlstill had an olderupdated_at~/.codex/.codex-global-state.jsonIn those cases the symptom was not only “missing from the sidebar.” The thread could also sort as if it were old, or open to what looked like an older state even though newer rollout data still existed on disk.
One reason I think this is worth separating from the existing
updated_atworkaround comments is that in my case updating SQLite alone was not the relevant repair. What helped was repairing the per-thread derived metadata instead: the stalesession_index.jsonlrow and the missing workspace hint in.codex-global-state.json. When stale rendering persisted after that, the only reliable workaround was creating a recovered copy from the recent tail of the canonical rollout.A narrow per-thread repair helped more than broad rebuilds:
session_index.jsonlrow soupdated_atmatches the rollout / sqlite timestamp.codex-global-state.jsonI’m not claiming this is the only root cause. The recent-subset / pagination explanation in the other comments may still explain many cases. This is just one additional pattern I observed locally: the canonical rollout and sqlite state were current, but per-thread derived metadata was not.
For version context: this was observed on Codex Desktop
26.409.20454(CFBundleVersion1462) on macOS26.4.1(25E253), Darwin arm64. I observed the stale/missing-thread behavior on April 12-13, 2026 as well as the preceding week, and it persisted across full app restarts, as well as Codex and macOS updates.I can reproduce this on a newer Codex Desktop build with additional evidence that points to the Desktop sidebar using a global recent-thread window rather than querying per workspace.
Environment:
26.415.4063626.4.1(25E253), Darwin arm64/Users/lzl/FILE/gitea/SheetMetalUnroll/ASMU-HTJLocal state is intact:
But the Desktop UI still showed effectively no historical workspace threads. I also rebuilt
~/.codex/.codex-global-state.jsonthread-workspace-root-hintsfrom~/.codex/state_5.sqliteand verified596/596matching thread ids mapped to the workspace root. After restarting Codex Desktop, that file was overwritten back to the small stale hint set (22total hints, only3for this workspace), so manually repairing the hint file while Desktop is running is not a durable workaround.The stronger signal is from the app itself:
~/Library/Logs/com.openai.codex/...reportsthread_count_total=50andthread_count_loaded_recent=50in app state snapshots.~/.codex/state_5.sqlitecontain only1row for this workspace.I inspected the local app bundle and the app-server protocol:
thread/listsupportslimit,cursor,sortKey,archived, andcwdfilters.cwdis an exact session-cwd filter andlimitis optional.THREAD_LIST_MAX_LIMIT = 100, but it can paginate.app.asarappears to use a global recent-thread list with hard-coded page size50:Notably, that request does not include a
cwdfilter. It looks like Desktop first loads a global recent list, then groups/filters those already-loaded threads by workspace. That makes older but valid workspace threads invisible until enough global pages have been loaded. A workspace with many historical sessions can show only a tiny subset if other projects have newer activity.Expected behavior:
thread/list({ cwd, archived: false, sortKey: 'updated_at', limit: 30 }), or otherwise keep a per-project recent quota.This still looks like a Desktop listing/pagination issue rather than data loss: the sqlite rows and rollout files exist, and
thread/listalready has the protocol support needed for a workspace-scoped query.Adding another macOS datapoint here because this matches what I’m seeing very closely.
I can confirm this looks like a sidebar / project-thread visibility bug rather than actual history loss.
What I’m seeing in the Desktop app:
What I verified locally:
~/.codex/sessions~/.codex/session_index.jsonlstill contains the missing thread IDs~/.codex/state_5.sqlitestill contains the missing threads for the exact samecwdConcrete example from my machine:
threadstable for the samecwdI also checked a few other local project roots and the behavior seems consistent with the sidebar only surfacing a recent subset of top-level threads. More recent project threads remain visible, while older top-level threads stop appearing in the Projects view even though they still exist on disk and in SQLite.
One extra detail:
So in my case this looks very close to:
If useful, I can provide:
threads where cwd=...session_index.jsonlandstate_5.sqliteWindows reproduction with additional evidence that this is not data loss and not provider-specific.
Environment:
OpenAI.Codex 26.422.3464.0codex-cli 0.125.010.0.26200, x64D:\GitHubProject\oss-maintainer-hubObserved behavior:
No conversations/ empty history.codex resume -C D:\GitHubProject\oss-maintainer-hubshows the previous sessions normally.model_providerbetween a custom provider andopenaidoes not fix the Desktop UI. CLI still sees the sessions.Local diagnostics from
~/.codex/state_5.sqliteand rollout metadata:That matches the recent-window hypothesis from #14751: the workspace has valid local threads, but none of them are in the initial global recent page.
I also tested two mitigations locally:
updated_at_ms/updated_atranks move into the first global recent page.\\?\D:\...to normalD:\...paths so exact cwd matching succeeds.Immediately after those changes, diagnostics showed the data was in the state that Desktop should be able to display:
However, after restarting/relogging into Codex Desktop, the project still showed empty in the sidebar. The Desktop/app-server then appeared to reindex/rewrite local SQLite metadata back to the old shape:
So this looks like two related Desktop-side issues on Windows:
cwd.Expected behavior:
thread/list({ cwd, archived: false, sortKey: 'updated_at', ... }), and paginate that workspace-scoped query.D:\...and\\?\D:\...should not split visibility.This is a serious blocker for long-running Codex projects on Windows because the Desktop UI can report "no conversations" even though all local conversations still exist and are resumable from CLI.
Additional macOS reproduction with a narrower root-cause signal: existing project history can be hidden by the Desktop/app-server model provider filter.
Environment:
Darwin 24.6.0 arm64 arm~/.codex~/.codex/state_5.sqlite~/.codex/sessions/.../rollout-*.jsonlObserved behavior:
state_5.sqliteand the matching rollout JSONL files.Key diagnostic result:
mify.model_providervalues, includingheadroom,custom,cfjwl,api111, andopenai.thread/listpath withmodelProviders: nullreturned only the current-provider (mify) threads.modelProviders: []returned threads across providers, including the older hidden history.So, at least in this reproduction,
modelProviders: nullappears to be interpreted as "current provider only", not "no provider filter". The Desktop sidebar therefore hides existing local project threads whose stored provider differs from the currently selected/default provider.This is not data loss, but it is a severe history visibility regression: the UI makes it look like project history disappeared even though the local SQLite rows and JSONL transcripts are still present.
Local workaround that restored visibility:
state_5.sqliteand the affected rollout JSONL files first.mify) in both places:threads.model_providerinstate_5.sqlitesession_meta.payload.model_providerin the matching rollout JSONLImportant detail: changing only SQLite is not necessarily sufficient because Desktop/app-server may recover or reconcile metadata from the JSONL session metadata. Both metadata sources had to agree for the workaround to be stable.
Expected behavior:
Potential fix directions:
modelProviders: [], or otherwise query all providers for history discovery.modelProviders: null/ omitted means no provider restriction, while a non-empty array means explicit filtering.This looks related to the broader issue reported here, but with provider filtering as a concrete additional failure mode beyond recent-window/cwd matching.