Codex Desktop project sidebar hides older workspace conversations despite existing local thread data
Codex Desktop project sidebar hides older workspace conversations while local thread data still exists
Feedback ID
I also uploaded in-app feedback for this issue. Feedback/thread id:
019deb11-ef45-7002-9474-af7ebd719efd
Environment
- Codex Desktop:
26.429.30905(CFBundleVersion 2345) - Platform: macOS
26.3(25D125), Darwin25.3.0, arm64 - Subscription: ChatGPT Pro
- Local storage:
~/.codex/state_5.sqlite,~/.codex/sessions,~/.codex/session_index.jsonl
Summary
Codex Desktop is hiding older project/workspace conversations from the left sidebar even though the underlying local thread data still exists and is unarchived.
This appears to be the same class of sidebar/history visibility bug reported in:
- https://github.com/openai/codex/issues/14751
- https://github.com/openai/codex/issues/17970
- https://github.com/openai/codex/issues/18640
- https://github.com/openai/codex/issues/20419
- https://github.com/openai/codex/issues/20741
The local evidence strongly suggests the Desktop sidebar is driven by a limited recent-thread preload, likely the first thread/list(limit=50, sortKey=updated_at) page, rather than loading or paging the full history for the selected workspace/project.
What I am seeing
In one local workspace, Codex Desktop shows only the current/recent conversation in the project sidebar. Older conversations for the same workspace are absent from the UI.
The missing conversations are not deleted:
- They are still present in
~/.codex/state_5.sqlite. - They are marked active / unarchived.
- Their rollout JSONL files still exist under
~/.codex/sessions. - They can be made visible again if their metadata is promoted into the recent window, which suggests this is a sidebar visibility/indexing bug, not data loss.
Local diagnostics
I checked the local SQLite state:
total_threads active_threads active_workspace_threads
------------- -------------- ------------------------
1369 1349 7
For the affected workspace, the active unarchived threads exist, but six of seven are outside the global recent window:
rank id updated_utc title
---- ------------------------------------ ------------------- -------------------------------
1 019deb11-ef45-7002-9474-af7ebd719efd 2026-05-02 23:58:23 current investigation thread
125 019dd048-6544-7512-97d9-7530accab631 2026-04-27 21:02:20 older workspace thread
126 019dd0b4-b783-7210-9cfb-6f476d5165af 2026-04-27 21:01:16 older workspace thread
179 019dcf5e-4008-7b10-bc12-7421030aaf43 2026-04-27 14:44:20 older workspace thread
296 019dbcfe-ffdb-7982-bbe8-0e938b452667 2026-04-24 00:59:51 older workspace thread
310 019dbaa8-738c-7532-acdb-88eb399cd838 2026-04-23 14:32:29 older workspace thread
333 019db150-5677-7b50-91fb-ac67b1ce1ee5 2026-04-22 01:54:15 older workspace thread
I also verified that the six older rollout files still exist under ~/.codex/sessions.
This matches the reports in #14751 and #18640: after enough newer conversations are created globally, older conversations from a given project fall outside the initial recent page and disappear from the Desktop project sidebar.
Steps to reproduce
- Start with a Codex Desktop profile that has many local conversations across multiple workspaces/projects.
- In project A, create at least one conversation.
- In other projects or general chats, create more than 50 newer conversations.
- Restart Codex Desktop.
- Open project A in the left sidebar.
- Observe that the older project A conversation is missing or the project shows
No chats. - Inspect local state under
~/.codex/state_5.sqliteand~/.codex/sessions. - Observe that the missing conversation still exists locally and is not archived.
Expected behavior
Codex Desktop should show all active unarchived conversations for a project/workspace, or at least page/fetch additional conversations for that specific project when the workspace group is expanded.
Existing conversations should not disappear from the project sidebar just because they are older than the global recent-thread preload.
Actual behavior
The sidebar appears to show only conversations that are already included in the initial recent-thread set. Older conversations remain on disk and in SQLite but are omitted from project grouping.
This makes the UI look like history has been deleted, even though local data still exists.
Suggested fix
The sidebar/project grouping should not depend only on the first global recent page.
Possible fixes:
- When expanding a project/workspace, call
thread/listwith acwdfilter for that workspace and page through results as needed. - Maintain project-specific pagination instead of only global recent pagination.
- If using a global cache, keep fetching pages until each visible project has enough representative threads or until the relevant project history has been exhausted.
- Add a safe local reindex or repair command for Desktop users when local state and sidebar state drift.
Impact
This is high impact for long-running projects because the affected conversations contain project context, design decisions, and implementation history. The current UI makes the history appear lost, which can lead users to assume data loss even though the data is still locally present.
9 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
It seems that archive/unarchive mutates
active-workspace-rootsto a single root, causing other project chats to disappear from sidebar despite threads existing and searchable and existing in the dbAdding another macOS repro with local diagnostics. This looks related, but in this case the app-server can return the affected project threads while the Desktop project sidebar still renders "No chats".
Environment:
Codex Desktop/0.133.0-alpha.1 (Mac OS 26.5.0; arm64)26.519.41501~/.codex/state_5.sqlite,~/.codex/sessions,~/.codex/session_index.jsonlObserved behavior:
No chats/ localized暂无对话.has_user_event = 1.thread/listagainst app-server with the exact projectcwdreturns the missing threads.Local evidence, redacted path:
Global rank evidence:
So this is not just "all project threads are outside the global recent 50"; at least one affected project thread is inside the recent window, yet the Desktop project sidebar still renders no chats.
App-server evidence:
Using a direct
thread/listrequest with the exactcwd,archived: false,limit: 20, andsourceKinds: []returns project threads, e.g.:This strongly suggests the persisted thread store and app-server listing path are healthy, but the Desktop sidebar/project UI is either:
cwd,vscodethreads differently thanthread/list,Expected behavior:
thread/list({ cwd: "<project cwd>", archived: false })returns active threads, the Desktop project sidebar should not showNo chats.cwd, it should show a diagnostic or normalize paths consistently instead of silently showing an empty project.This is causing users to think their working history was deleted even though the local thread data is still present and readable through app-server.
Follow-up: this is not an isolated one-off event for this user. The same "project shows No chats / 暂无对话 while local threads still exist" failure has recurred multiple times across different projects.
Additional local evidence from the same macOS machine:
So almost all local thread rows are active and have user events.
Affected/at-risk projects with active local threads still present:
The user reports this has happened repeatedly, not just once or twice. From the local diagnostics, the data remains present in:
~/.codex/state_5.sqlite~/.codex/sessions~/.codex/session_index.jsonlThe failure pattern is recurrent:
No chats/暂无对话.thread/listfor the exactcwdcan return the missing threads.This creates repeated apparent "chat loss" for normal users, even though the underlying records remain on disk. It is severe because users naturally try manual database/file workarounds, which can make the state worse. A supported repair/reindex command or a Desktop-side "rebuild local chat index" action would be very helpful until the sidebar project-history bug is fixed.
Request:
codex doctor --repair-thread-indexor equivalent safe reindex operation.I can reproduce what looks like the same underlying issue on macOS Codex Desktop.
This does not look like local data loss. In my local store, the missing project conversations still exist in
state_5.sqlite, their rollout files are present, and app-server can return them when queried with a server-sidecwdfilter.Sanitized evidence from one affected project:
threadsfor the same project cwd.thread/listcall with the projectcwdreturns the project history correctly.thread/listpage followed by client-side project filtering reproduces the truncated visible subset.The behavior seems consistent with pagination happening before project filtering. In other words, the UI appears to load a limited global recent-thread page, then group/filter that already-loaded subset by project, instead of fetching the selected project's own history.
Suggested fix:
thread/listwith a server-sidecwdfilter, or add a server-sidecwdPrefix/projectRootfilter if child working directories should be included.This is easy for users to interpret as deleted history, but the local thread data and app-server project query path appear to be healthy.
Adding another Windows/WSL Codex Desktop datapoint.
This does not look like data loss. In my local store, the missing project thread still existed in
state_5.sqlitewitharchived=0, had the expected projectcwd, and its rollout/session file was still present. The Desktop sidebar/project thread listing only surfaced two very recent threads for that workspace, while an older May 19 thread updated on May 22 was hidden until I found the thread id by querying the local SQLite DB directly and pinned it.So this matches the “local thread data exists, sidebar/project discovery hides older unarchived conversations” failure mode.
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.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. It would still be very helpful to have an official full local reindex/recovery command that rebuilds sidebar/project history from durable local state.
Spent a few days investigating this on an affected install and wanted to share findings that might help others here. Your threads are not deleted. The conversation data stays intact in ~/.codex/state_5.sqlite (integrity check ok) and every thread still opens with codex resume <thread-id>. What changed is the sidebar/search behavior: it shows a bounded window of recently active threads, and older threads silently age out of view — which looks exactly like data loss. There is a one-command workaround. Giving a hidden thread one trivial turn of activity brings it back into the sidebar (and search), persistently across restarts: codex exec resume <thread-id> --skip-git-repo-check "reply with just OK" Notes from testing: editing local state files .codex-global-state.json, state_5.sqlite flags) does not restore listing, and any edits made while the app is running are overwritten on exit. In-session "restores" (asking the agent to fix the sidebar, fork-based restores) only appear to work and create duplicates. Documented the verified model with small recall/diagnostic scripts here: https://github.com/BulletCode-69/codex-thread-rescue (MIT). Hope it saves someone the panic I went through.