Desktop app sidebar only shows loaded recent subset, not full workspace history
What version of the Codex App are you using (From “About Codex” dialog)?
26.311.21342
What subscription do you have?
GPT Pro
What platform is your computer?
Darwin 25.3.0 arm64 arm
What issue are you seeing?
Older workspace conversations still exist locally and are visible in Codex CLI, but disappear from the Codex Desktop App sidebar unless they are pinned or recently updated.
This looks like a sidebar/history loading issue rather than actual data loss.
Observed example: conversations under a workspace such as webmcp-dom remain present in local history and in CLI, but only a subset appears in the Desktop App.
What steps can reproduce the bug?
- Have a workspace with many older conversations and more than ~50 recent conversations overall.
- Confirm those workspace conversations still exist in Codex CLI / local history.
- Open the Codex Desktop App and check the sidebar.
- Observe that only a subset of that workspace's conversations appears.
- Pinning a hidden conversation can make it visible.
- Unpinning it and restarting the app can make it disappear again.
Additional local observation:
- If a hidden conversation is moved upward in recency, it reappears in the app.
- That suggests the sidebar is driven by a preloaded recent subset rather than full workspace history.
What is the expected behavior?
Expanding a workspace in the Desktop App should show the workspace's full conversation history, or fetch additional pages for that workspace.
Existing conversations should not disappear from the sidebar just because they are older than the startup recent window.
Additional information
Local investigation suggests the Desktop App starts with a recent conversation request like thread/list(limit=50, sortKey=updated_at) and receives a next_cursor, but the normal sidebar/workspace UI does not appear to page in older conversations when expanding a workspace.
Codex CLI can still see the same conversations, so this appears to be a Desktop App sidebar/history loading bug rather than actual history loss.
8 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Additional debugging notes:
I dug into this locally a bit more and the behavior looks consistent with a sidebar data-loading issue rather than local-history loss.
What I observed:
thread/list(limit=50, sortKey=updated_at).thread/listresponse includesnext_cursor, so the backend/app-server pagination path exists.Why I think this is the root cause:
Possible fixes, in order of preference:
next_cursoruntil enough matching threads for that workspace are loaded or pagination is exhausted.So my current guess is that the bug is in the Desktop App renderer/sidebar loading path, not in local persistence and not in thread storage itself.
Happy to add more repro details if useful.
I put together a small local mitigation for this while debugging it:
chenjingdev/codex-sidebar-refresher
What it does:
~/.codex/.codex-global-state.jsoncwdexactly matches those rootsexec, subagent, and already pinned threadsthreads.updated_atin~/.codex/state_5.sqliteWhat it does not do:
sessions/*.jsonlSo this is only a temporary local workaround for people blocked by the current behavior. It effectively re-promotes already-existing local threads so the app loads them again.
The script makes a backup first under
~/.codex/repair-backups/..., but it does rewriteupdated_at, so recent ordering will change.Example usage:
./scripts/refresh-visible-workspaces.sh --threads-per-root 3or
./scripts/refresh-visible-workspaces.sh --total-threads 50Current implementation is macOS-oriented because it force-restarts the local Codex app after updating the local state DB.
You can ask Codex to patch the Codex plugin as described in #15368. It worked surprisingly well for me. Just give Codex the link.
I am seeing the same issue on macOS with Codex Desktop
26.422.21637(CFBundleVersion 2056).The important part: local data is not missing. The threads exist in
~/.codex/state_5.sqlite, but Codex Desktop only loads a global window of recent threads and then projects appear incomplete or as if they had no chats.Current local evidence:
~/.codex/state_5.sqlitehas the expected project threads:Crv_PM: 14 active threadsWebPhotoCRV: 8 active threadsAyudaCodex: 5 active threads~/.codex/.codex-global-state.jsonis not empty:active_roots: 3thread_titles: 27thread_order: 27~/.codex/session_index.jsonl: 27 entries~/Library/Application Support/Codex/sentry/scope_v3.jsonrepeatedly reports:thread_count_total: 50thread_count_loaded_recent: 50I also inspected
/Applications/Codex.app/Contents/Resources/app.asarand found the recent thread loader starts with:This matches the observed behavior: if a workspace/project has threads outside the initial global recent window, the Desktop UI does not show the complete project even though the local SQLite data is present.
I tried the usual safe steps:
Codex.appglobal-stateandsession_indexNone of those fixed the issue because the underlying thread data was already present.
Expected behavior:
cwd/workspace, not only rely on the initial global recent-thread window.RECENT_CONVERSATIONS_PAGE_SIZEshould be configurable or much larger.By projectshould not show incomplete projects just because their threads fell outside the initial recent window.This is a serious workflow blocker for projects with more than a handful of threads.
Additional local finding after deeper testing. This may help isolate the actual Desktop reindexing bug:
the issue is not only the 50 global recent-thread limit. There is also a reindexing/source-of-truth mismatch.
Root cause observed locally:
Codex Desktop does not reliably render project thread visibility from
state_5.sqliteorsession_index.jsonlalone. The UI state appears to be derived from themtimeof therollout-*.jsonlfiles under:Additional external confirmation: after another update, the same bug remains but the compiled patch target moved again.
In extension version
26.5422.21459, the relevant logic moved to:webview/assets/app-server-manager-signals-DaIWbgQQ.jsThe conceptual patch points are still:
refetchThreadList(...)loadNextThreadListPage(...)50A local workaround reportedly changed the initial refresh from:
listRecentThreads({ limit: 50 * this.pageCount, cursor: null })to a full traversal helper, and raised load-more page size from
50to500.This reinforces that the underlying bug is unchanged, but the compiled implementation keeps moving between builds. A local bundle patch is therefore not a maintainable solution.
Please expose an official setting or fix project thread loading so project views query all local threads by project/cwd instead of depending on the latest 50 global recent threads.
I can still reproduce what looks like the same Desktop sidebar/history issue on:
26.422.71525(CFBundleVersion 2210)25.3.0arm64Local evidence from one affected workspace:
.codex-global-state.json:project-order: yeselectron-saved-workspace-roots: yesthread-workspace-root-hints: has matching entries~/.codex/state_5.sqlitewith:archived = 0has_user_event = 1updated_atamong active user-event threads; the other affected threads are ranks 212, 214, 215, and 227.No chats.This matches the suspected first-page behavior described here: the affected project’s newest thread is just outside the initial 50 recent-thread window, while newer projects show normally.
One additional observation: I tried a local workaround that added many older thread IDs to
pinned-thread-ids; that made some project groups disappear from the sidebar, so large-scale pin hydration does not look like a safe workaround. A very small project-specific pin test is still pending.No raw rollout/session files were attached because they may contain private source paths, prompts, and project content.