Codex Desktop project threads disappear from project views/search while session JSONL remains readable
Summary
Codex Desktop can silently hide local project conversations from the project page and search even though the underlying conversation data still exists on disk and can be read/resumed. In the latest case, a saved RSSHub project appeared empty in the Desktop UI, but four ~/Code/RSSHub threads were still present in ~/.codex/sessions, present in state_5.sqlite, and readable by thread id. After manually refreshing local metadata/index files, the same four threads became visible again.
This looks like a local Desktop indexing/listing consistency bug rather than deleted conversation data.
Related issues I found before filing this: #21581, #22592, #22452, #23979, #23825.
Environment
- OS: macOS 26.5 (25F71)
- Codex Desktop app: 26.527.31326
- Codex CLI: 0.135.0-alpha.1
- Local state involved:
~/.codex/sessions/**/*.jsonl~/.codex/session_index.jsonl~/.codex/state_5.sqlite~/.codex/.codex-global-state.json
What happened
Several saved project histories disappeared from the Desktop UI, including projects such as jitashe, RSSHub, Folo, and LeanRead.
The most concrete reproduction was RSSHub:
- The Desktop project page for
~/Code/RSSHubappeared empty. - Searching for
rsshub,公众号,route, orPanwikidid not show the expected RSSHub conversations. - A general thread list also did not surface those project threads.
- However, direct thread reads by id still worked, and the threads showed
cwd: ~/Code/RSSHub.
Example affected thread ids:
019e30d8-7eac-7bc1-ac2f-0ced04035720 RSSHub / WeChat subscription discussion
019e16c8-3959-7432-970f-4f687708ad2c RSSHub source update delay investigation
019e11b7-ae2e-71d1-ae6e-44d8953dff50 RSSHub custom route dashboard discussion
019e1182-e46e-75a3-bae2-ff9dae7a2fa1 RSSHub Panwiki login/cookie route discussion
Evidence that the data was not lost
The affected RSSHub threads were still available in local source files and local state:
- Matching rollout JSONL files existed under
~/.codex/sessions/.... state_5.sqlitecontained rows for those thread ids with:cwd = ~/Code/RSSHubarchived = 0- valid titles/previews
- valid rollout paths
- Reading the threads directly by id returned their turn history and
cwd: ~/Code/RSSHub. codex resume <thread_id>remained a reliable fallback for continuation.
This means the UI/search/project listing was stale or inconsistent while the canonical conversation data still existed.
Manual recovery that made the threads visible again
After manually refreshing local metadata, the RSSHub threads immediately became visible in Desktop search and recent thread listing.
The recovery touched these local pieces of state:
- Added/normalized
thread_source: "user"in RSSHub session metadata. - Appended a metadata-only
task_completeevent tied to a real existing turn id, so the thread looked recently completed without changing conversation content. - Updated
state_5.sqlitefor the affected rows:
cwd = ~/Code/RSSHubthread_source = user- refreshed
updated_at/updated_at_ms archived = 0
- Refreshed
~/.codex/session_index.jsonlrows for the same thread ids. - Added workspace hints for the thread ids in
~/.codex/.codex-global-state.json.
After that, searching rsshub returned the four RSSHub threads again, and the unfiltered recent list also showed them.
Expected behavior
If a local session JSONL file exists, state_5.sqlite points to it, the thread is not archived, and its cwd belongs to a saved project, Codex Desktop should show it in the corresponding project history and search results.
At minimum, Desktop should provide a reliable local reindex/repair path so the UI cannot get stuck showing an empty project while the sessions are still recoverable on disk.
Actual behavior
The Desktop UI/project list/search can show an empty or incomplete project history even when:
- the session files still exist,
- SQLite rows still exist,
- the thread can be read directly by id,
- and
codex resume <thread_id>can still continue the thread.
Why this is harmful
From a user perspective, it looks like conversation history was deleted. In reality the data is still present locally, but the UI makes it undiscoverable. This is especially risky for long-running local project work because users may start duplicate threads, lose project context, or assume data loss.
Suggested fixes
- Make Desktop project/search listing rebuild from
~/.codex/sessions/**/*.jsonlwhen local indexes are stale. - Detect and repair drift between
session_index.jsonl,state_5.sqlite, and.codex-global-state.json. - Avoid relying on metadata-only recency/index fields to decide whether an existing local project thread is visible.
- Add a user-facing "Reindex local conversations" command or automatic repair when a saved project appears empty but matching sessions exist on disk.
- Consider showing a warning if a project has session files on disk but zero visible threads in the UI.
17 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I added a small privacy-safe helper for this exact class of report in
trace-to-skill@0.1.72:It does not repair Codex state or mutate local files. It only builds a local summary that compares rollout session metadata with
session_index.jsonl, then reports:codex resume <thread_id>commandsThe goal is to make issues like this easier to diagnose publicly without attaching raw transcripts, SQLite databases, or full local paths. Release/proof: https://github.com/grnbtqdbyx-create/trace-to-skill/releases/tag/v0.1.72
Additional Windows reproduction: valid local project threads remain hidden and deep links open blank
I am seeing a closely related issue on Windows with Codex Desktop where local project threads are recoverable from durable local state and resumable from the CLI, but Codex Desktop still hides some of them from the project sidebar and opens them as a blank/loading chat via
codex://threads/<id>.This comment is sanitized. Project names, local paths, thread IDs, usernames, and feedback IDs are represented with placeholders.
Environment
26.527.31326<project-name><repo-path>\\?\<repo-path>User-visible behavior
<project-name>project should have 19 active chats.<thread-id-1>—<milestone-or-thread-title-1><thread-id-2>—<milestone-or-thread-title-2><thread-id-3>—<milestone-or-thread-title-3><thread-id-4>—<milestone-or-thread-title-4>Ctrl+G/ thread search can find some content from the missing chats, but clicking the result does not open the conversation correctly.codex://threads/<thread-id>opens Codex Desktop, but the main chat area remains stuck on the blank Codex icon/loading state.codex resume <thread-id>works in Codex CLI for the affected threads.Local state evidence
I inspected local Codex state before and after a narrow repair attempt.
SQLite / project count
state_5.sqliteshows:<project-name>rows:20191exit:19SQLite integrity checks passed:
Title repair attempted
Initially, 8 active
<project-name>rows had blankstate_5.sqlite.threads.titlevalues. I repaired only the blank SQLite titles using existing names fromsession_index.jsonl.After repair:
This did not fix the Desktop UI. The sidebar still showed 15 chats and the same 4 deep links still opened to a blank Codex icon/loading view.
session_index.jsonl
session_index.jsonlcontains the affected thread IDs and thread names. Sanitized examples:Rollout JSONL parseability
The affected rollout JSONL files exist and parse with no errors:
.codex-global-state.json
.codex-global-state.jsoncontains all affected thread IDs and contains these keywords:The affected IDs are found in
.codex-global-state.json.process_manager reset attempted
The full log search showed at least one affected thread referenced in:
I closed all Codex processes and renamed
chat_processes.jsonto a.bak-*file so Codex would recreate process-manager state.After reopening Codex Desktop:
codex://threads/<thread-id>still opened a blank Codex-icon loading viewCommands that reproduce the blank deep-link behavior
Each opens Codex Desktop but remains stuck on the blank Codex icon/loading state.
Expected behavior
If a thread is:
state_5.sqlitearchived = 0rollout_pathsession_index.jsonl.codex-global-state.jsoncodex resume <thread-id>then Codex Desktop should either:
codex://threads/<thread-id>or thread search.At minimum, Desktop should provide a supported local reindex/repair command that reconciles:
state_5.sqlitesession_index.jsonl.codex-global-state.jsonsessions/**/*.jsonlActual behavior
Codex Desktop continues to show only 15 of 19 active project threads, and the 4 missing threads open to a blank/loading chat view via deep link, despite all local durable state being present and parseable.
Suspected area
This looks like a Desktop UI/sidebar/hydration issue rather than lost session data.
Possible areas:
thread-workspace-root-hintsor equivalent project-thread mapping<repo-path>and\\?\<repo-path>Impact
This makes it look like project history is missing even though the local data still exists and can be resumed through the CLI. For multi-milestone project work, the missing threads contain build history, implementation context, review evidence, and milestone decisions that are difficult to reconstruct from the GUI.
Related issues
codex://threads/<id>behavior despite parseable local transcript.I’m seeing what looks like the same issue on macOS.
Codex Desktop search finds the older thread, but when I click the result or press Enter, the main pane goes blank and stays on the Codex loading icon. The thread data appears to exist: the local log shows
thread/searchsucceeding, and the selected conversation route changes to the expected/local/<thread-id>path. But after selecting the result, the app does not appear to resume/render the thread.Environment:
Example log lines:
2026-06-05T20:29:31Z:thread/searchsucceeds.2026-06-05T20:29:35Z: app routes to/local/019e8db6-cf73-7b72-8175-29e7b12dcdac.Expected: selecting a search result opens the thread.
Actual: selecting the result opens a blank loading pane.
Additional sanitized macOS reproduction: active project thread looked missing because discoverability/indexing was stale
I hit a closely related Codex Desktop case on macOS where the conversation data was not lost, but the UI made the thread look missing. This comment is intentionally sanitized: no project names, local paths, thread ids, screenshots, or conversation content.
Environment:
User-visible behavior:
Evidence that the data was not lost:
Expected behavior:
Actual behavior:
This seems to be the same general class as this issue, with a slightly different failure mode: not necessarily a blank deep link, but stale project/sidebar/search metadata making an active thread undiscoverable by the terms a user would naturally search for.
Hi everyone, I'm tracking the same Codex Desktop missing-thread/sidebar-history issue on macOS.
For those affected here: did you eventually get all hidden project threads back in Desktop? If yes, what exact method worked durably for you?
Examples I'm trying to distinguish:
codex resume --all <thread-id>rehydrated itsession_index.jsonl/state_5.sqlite/.codex-global-state.jsonfixed itlistAllThreadspatch fixed itIn my case, the missing project threads still exist in
~/.codex/sessionsandstate_5.sqlite, but Desktop does not hydrate them back into the project sidebar after restart. Any confirmed durable fix would help. Please do not share private session contents; sanitized method/results are enough.I opened up another chat and asked it to find it and refresh it, and that brought it up again.
For local session inspection/backup, Clean My Agent may help here; it reads Codex session data and can export sessions safely: https://github.com/blain3white/clean-my-agent
Adding a macOS datapoint after updating to the latest Desktop build.
Environment:
~/.codexRecovery status on my affected project:
state_5.sqlitestill has 251 active/non-archived rows with the expected project cwd.~/.codex/sessions.So my current result is: 26.608.12217 looks like a partial recovery, not a full recovery. I still see this as an incomplete Desktop sidebar/project-history hydration issue rather than deleted local data.
Update: appears fixed after Codex Desktop 26.608.12217
Quick update from my Windows reproduction above: after updating Codex Desktop from
26.527.31326to:the previously missing project conversations appear to have been restored in the Desktop UI.
Before update
In
26.527.31326, the affected project had:19expected active local project chats instate\_5.sqlite15visible chats in the Codex Desktop project sidebarsession\_index.jsonlentriesparse errors: 0.codex-global-state.jsoncontaining the affected thread IDscodex resume <thread-id>working from CLIBut the Desktop UI still did not show four project chats, and opening them via:
resulted in a blank Codex-icon loading view.
After update
After updating to
26.608.12217, the missing conversations are visible again in the Codex Desktop project history. The restored threads include the previously missing milestone/project chats that had been recoverable only through local state or CLI resume.Notes
I did not need to delete the canonical
.codexsession data. The data had remained present locally throughout the issue. The update appears to have fixed or repaired the Desktop UI/project-history hydration/listing behavior.This suggests the issue was likely in the Desktop app's project/sidebar/thread hydration or local index reconciliation path rather than actual session data loss.
Thanks from my side this appears resolved in
26.608.12217, though it may still be useful to keep this issue open until maintainers confirm whether the fix was intentional and whether a local "reindex conversations" command is planned for similar future drift.Wanted to add in something anecdotal that I've noticed - when a chat is pinned, it does not disappear.
I know this because oftentimes I have had chats that have disappeared, and then I've found them and got them to be surfaced again by pinning them. I'll continue chatting in the thread and unpin it, and then it will disappear again.
However, if I keep it pinned the entire time and use it and chat with it that way, it does not disappear.
I am seeing the same class of issue in Codex Desktop on macOS.
Feedback / thread id:
Additional local evidence from my machine:
The user-visible problem is that after refreshing Codex Desktop or quitting/reopening it, the Pioneer project's chat history disappears from the project sidebar. The threads are not actually deleted: they can still be found through global search / direct thread access.
Local state confirms this is not data loss:
At the same time, the Desktop global project state keeps the saved workspace root as the symlink path:
So this looks like a project/sidebar grouping bug where Codex Desktop mixes the saved symlink path with the resolved realpath. The underlying thread rows exist and are unarchived, but the project sidebar can look empty after refresh/restart.
Expected behavior: Codex Desktop should treat a saved project symlink path and its resolved realpath as the same project identity, or otherwise keep project/thread grouping stable across restarts. At minimum, it should provide a safe reindex/repair path so existing local threads do not look deleted.
Adding another macOS datapoint that matches this issue, with local state still present but Desktop project/sidebar discovery incomplete after an update.
Environment
26.608.1221737220.138.0-alpha.70.137.0~/.codexUser-visible symptoms
No chats/暂无对话in the left sidebar even though local threads still exist.FastAPI20251222: sidebar shows no chats, local DB has hundreds of active rows.Hermes: sidebar shows no chats, local DB has active rows.yousenwebview: sidebar shows no chats, local DB has active rows.deeptutor: sidebar shows only a partial recent subset rather than the full local history.Cmd+Qquit/reopen did not fix it.Local evidence
SQLite integrity checks pass:
Thread counts from
~/.codex/state_5.sqlite:Largest affected active cwd groups:
There is also a symlink/realpath split for one project:
The Git worktree authority resolves to:
Recovery attempts already tried
state_5.sqliteandlogs_2.sqliteare intact.archived=0and have validcwd, titles, and rollout paths.~/.codex/.codex-global-state.json:thread-workspace-root-hintsfrom about81to about1700;project-order;deeptutorandyousenwebview.Cmd+Qand reopened.Result: project/sidebar history is still incomplete. This suggests
.codex-global-state.jsonhints/project-order are not sufficient, or another renderer/app-server/sidebar cache or query layer is involved.Related but probably separate observation
The same update window also left mobile Remote Control unusable locally. Evidence points to standalone/daemon drift rather than the same sidebar root cause:
codex remote-controlprocess was still from Homebrew Codex;codex remote-control start --jsonfailed because managed standalone Codex was missing at~/.codex/packages/standalone/current/codex;remote_control_enrollmentsentries were stale.Ask
Could the Desktop team provide a supported local reindex/rebuild procedure for project history discovery?
In particular:
state_5.sqlite,session_index.jsonl,.codex-global-state.json, cloud sync, an app-server cache, or a combination?threads.cwd?No chats?I have not attached raw DB/log/session files because they can contain private prompts, paths, git remotes, tokens, cookies, and API keys. Happy to provide more sanitized diagnostics if there is a recommended redaction script.
Adding a current-build macOS datapoint and linking the broader report: #27601.
Environment:
Local data was intact:
After a restart/account-switching session,
.codex-global-state.jsonhad driftedactive-workspace-rootsto a single child workspace. That made other workspace histories appear missing/unloaded even though the DB and session index were healthy. Reopening Desktop against the parent workspace root restored the active root without killing active workers:One detail that may help triage: a state repair while Desktop was live could be overwritten back to a child root by the running app. Reopening the parent root through the bundled launcher made the repair stick.
Additional macOS reproduction: active task hidden after blank view and Back navigation
I hit what appears to be the same Codex Desktop project/thread visibility bug on macOS.
Environment
26.707.51957(build5175)26.1arm64User-visible behavior
Evidence that the task was not lost
active, with an in-progress turn and intact recent history.This points to a Desktop project-list/navigation/rendering inconsistency rather than deleted task data.
Expected behavior
Impact
For long-running work this looks like data loss and can lead users to start duplicate tasks or lose confidence that active work is still running.
Private project names, local paths, and thread IDs are intentionally omitted.
Recovery experience and real-work impact
One detail that made the impact concrete: the hidden task was part of a long-running catalogue and approval workflow for Mean Man, a New Zealand grocery price-comparison app. The task held ongoing crawler, admin-review, and verification context, so the empty project screen looked like substantial active work had vanished.
The recovery itself was a useful Codex dogfooding case:
We recovered it collaboratively using Codex itself, without restarting the app, altering local databases, repairing indexes, or reconstructing the work from a handoff. That was reassuring, but users should not need a second Codex task to discover and reopen an active task hidden by the Desktop UI.
This should probably be treated as an index/projection consistency issue, not as conversation deletion.
For recovery, I would separate three states: durable thread record exists, project association exists, and UI/search projection has indexed it. The UI can then show “local thread exists but project index is stale” with a rebuild action instead of rendering an empty project. The important invariant is that a missing projection must not look identical to an empty project.
I maintain Better Agent (https://github.com/ofekron/better-agent), and this same separation matters for restart recovery: session JSON/events are the source, while sidebar/search/project views are rebuildable projections. If useful, a star helps other agent-runtime builders find the project.