Repository navigation
Codex Desktop silently hides project conversations outside the global recent-50 window #21128
Description
Summary
Codex Desktop currently makes older project conversations effectively disappear from the UI once they fall outside the global recent conversation window. This is not an edge case and it is not just cosmetic: it makes the Desktop app unreliable as a working memory for real projects.
In my daily use, any thread that has not been updated for about a week becomes impossible to find in the Desktop UI. After investigating locally, this is not because the data is deleted. The local session files and SQLite rows are still present. The problem is that Desktop appears to preload only a global recent set of conversations, then groups/searches only that already-loaded subset.
This is a serious UX regression. Users are led to believe their project history has been deleted or lost, while the data is still on disk and visible through lower-level storage/CLI paths. Please prioritize a real fix rather than requiring users to patch bundles, touch rollout mtimes, pin hidden threads, or manually query SQLite.
Environment
- Platform: macOS, arm64
- Codex Desktop observed:
26.429.30905(CFBundleVersion 2345) - CLI observed:
codex-cli 0.125.0 - Date reproduced: 2026-05-05
I also inspected another local Codex app bundle (26.422.21459) and found the same recent-list behavior, so this does not appear to be a one-off local install issue.
Local evidence
Local persisted data is present:
~/.codex/sessions: 2014 rollout JSONL files
~/.codex/session_index.jsonl: 564 entries
~/.codex/state_5.sqlite: 1250 active thread rows
Using a conservative filter for human-visible direct conversations:
where archived = 0
and agent_role is null
and source in ('vscode', 'cli')I get:
890 direct active local conversations
50 updated within the last 7 days
840 older than 7 days
The cutoff is extremely telling:
rank 50: 2026-04-28 13:13:24 local time
rank 51: 2026-04-27 20:12:58 local time
So the issue looks like "older than a week" only because my last week of usage produced exactly 50 newer conversations. Once a conversation drops from rank 50 to rank 51, it disappears from the Desktop project UI/search even though it still exists locally.
Example project-level impact with private paths redacted:
Project A: 447 active local conversations, 0 in top 50, newest rank 56 -> not findable in Desktop project UI
Project B: 24 active local conversations, 0 in top 50, newest rank 257 -> not findable in Desktop project UI
Project C: 8 active local conversations, 0 in top 50, newest rank 67 -> not findable in Desktop project UI
Telemetry from the Desktop app also matches this failure mode:
thread_count_loaded_recent: 54
while the local database has hundreds of active direct conversations. The extra 4 appear to be pinned/currently loaded threads on top of the hardcoded recent 50.
Code-path evidence from the Desktop bundle
The Desktop app bundle contains this recent-loader behavior:
refetchThreadList(...) {
...
await this.listRecentThreads({ limit: 50 * this.pageCount, cursor: null })
...
}
loadNextThreadListPage(...) {
...
await this.listRecentThreads({ limit: 50, cursor: this.nextCursor })
...
}
searchThreads(...) {
// searches only this.conversationIds, i.e. the loaded recent subset
}
listRecentThreads(...) {
return this.requestClient.sendRequest("thread/list", {
limit,
cursor,
sortKey: this.sortKey,
modelProviders: null,
archived: false,
sourceKinds: ...
})
}This means the project sidebar is effectively grouping a global recent subset, not loading the actual history for each project/workspace.
Expected behavior
The Desktop UI must not hide valid local project conversations just because they are outside the latest 50 global conversations.
Expected behavior should be:
- When expanding/opening a project, query all local threads for that project/workspace root (
cwd) with pagination. - Sidebar search should query all persisted local threads, not only
recentConversationIdsalready loaded into memory. - The UI should clearly distinguish "no chats" from "older chats not loaded yet". The current behavior is misleading.
- The recent window size should either be much larger or configurable as a temporary mitigation, but increasing 50 to another fixed small number is not the real fix.
- Add a regression test with >50 local conversations across multiple projects where one project has no conversations in the global top 50 but still has valid local history.
Related issues / prior reports
This appears related to, and still reproducible despite, earlier reports:
- Sidebar only shows the 50 most recent threads, making older threads inaccessible #15060
- Desktop app sidebar only shows loaded recent subset, not full workspace history #14751
- Windows app: older local threads disappear from sidebar and sidebar search after restart while still present on disk #17540
- Mac app hides older local conversations after update because bogus root-level
statussessions flood recent local history #18364
Please do not treat this as solved while Desktop still depends on a global recent-50 preload for project history visibility. This bug seriously damages trust in the app because it makes real, persisted work history appear to vanish.
Activity
github-actions commentedon May 5, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
studioetc commentedon May 5, 2026
This is driving me mad, and it's exacerbated by the fact that the companion tasks launched by the plugin are taking up a large amount of the 50 available slots. Companion/review jobs should not share the user's main Codex Desktop history feed by default #282
claell commentedon May 6, 2026
This might actually be the reason. I also did some digging before and found this and was not sure whether this is the case. Especially because the source code of the desktop app is not available, I think. But I also had this 50 sessions limit impression, and this might explain why people complain about things disappearing. So this might actually be a feature, not a bug, but I see it really as a bug, and especially if this is not documented and cannot be changed by users.
studioetc commentedon May 9, 2026
It's a feature waiting to happen... a "load more" under older projects or something along those lines would go along way.
alferrante commentedon May 11, 2026
I’m seeing what appears to be the same issue on macOS Codex Desktop
0.129.0-alpha.15.A thread is present locally and has the expected title in
~/.codex/session_index.jsonl:019d7348-09ea-76e2-9768-8fd4e3222671REDACTED~/.codex/sessions/2026/04/09/...019d7348...jsonlBut searching Codex Desktop for
REDACTED(exact text from title) does not return it. The search UI instead falls back to unrelated “Recent chats.” (Thread I was looking for was outside of most recent 50 - sat at around #78.)I also checked Codex Desktop app storage under
~/Library/Application Support/Codex; the title/session ID does not appear there, which suggests Desktop search is not querying the full local session archive /session_index.jsonl, only a narrower recent/cache index.Expected: known local sessions with matching titles should appear in Desktop search, even if they are older than the recent chat window.
Actual: matching local session exists on disk but is missing from Desktop search.
gydx6 commentedon May 12, 2026
I can reproduce what looks like the same issue on macOS with the current Codex Desktop build.
Environment:
26.506.31421,CFBundleVersion 2620codex-cli 0.130.0Darwin 25.4.0 arm64Show = All chats,Sort by = Updated,Organize = Recent projectsObserved behavior:
For one local project, Codex Desktop only shows a small handful of recent chats in the project sidebar, even though many more conversations still exist locally and are visible through lower-level local state / CLI resume flows.
Local evidence:
~/.codex/state_5.sqlitetotal thread rows:1118archived = 0 and agent_role is null:544~/.codex/sessions:930~/.codex/session_index.jsonl:494linesFor the affected project cwd, redacted as
/Users/<user>/code/st_unet_wrfhydro:5734063282025-09-16 09:53:182026-05-12 16:48:595This makes the UI look like it only shows conversations from roughly the last two weeks, but the local data shows that older conversations are still present.
Global recency ranking also matches this issue's suspected failure mode. Among active direct conversations, this project's first relevant rows are at approximately:
126877788182101Counts by global recency window for the same project:
2project conversations7project conversations46project conversations290project conversationsSo this does not look like data loss and does not look like a fixed two-week cutoff. It looks like Codex Desktop is still grouping/searching only conversations that have already been loaded from a global recent window, instead of querying/paginating all conversations for the selected project cwd.
Expected behavior:
When a project is shown in the sidebar and
Show = All chatsis selected, expanding/searching that project should be able to discover all persisted local conversations for that project cwd, with pagination if needed. The UI should not make older valid project conversations appear to be gone just because they are outside the currently loaded global recent set.bartmcdonough commentedon May 13, 2026
I’m seeing this again on Codex Desktop 26.506.31421 (bundle 2620), macOS 26.5 arm64, codex-cli 0.128.0.
Concrete repro/evidence:
0vscode~/.codex/sessions/...~/.codex/session_index.jsonlcontains the same thread id/title~/.codex/state_5.sqlitecontains the thread rowNo matches.Expected: sidebar search should search persisted local thread storage, not only currently loaded/recent sidebar items. If a thread exists in
state_5.sqlite, is unarchived, and has a valid rollout file/session index entry, exact-title search should find it.bartmcdonough commentedon May 13, 2026
One clarification: this is not only a search bug. The missing thread was also not visible in the normal Chats sidebar.
Search appears to fail because it only searches the loaded sidebar/recent subset. The higher-level issue is that valid unarchived local chats outside that subset are not visible or discoverable in the Desktop UI at all.
miccTronic commentedon May 13, 2026
After hours of tracking down the cause for my threads disappearing I came across this bug report that most likely explains it, since I can also "recover" threads from the CLI by "touching" them. But obviously this is not a solution.
This limitation has serious implications. Probably it was introduced for a reason (performance?), but a better solution should be a priority. For a short-term fix, at least a config setting should be introduced that allows the history limit to be changed manually.
ashe0047 commentedon May 18, 2026
I actually spent my precious Codex quota debugging this bug. WTF
mgdark-commits commentedon May 24, 2026
I can add a Windows Codex Desktop reproduction with a concrete local workaround that confirms this is a finite global recent-window problem, not data loss.
Environment:
26.519.5221.0%USERPROFILE%\.codex\state_5.sqlite%USERPROFILE%\.codex\.codex-global-state.json%USERPROFILE%\.codex\session_index.jsonl%USERPROFILE%\.codex\sessions\...\rollout-*.jsonlObserved behavior:
No chats/ incomplete chat lists.state_5.sqlitehad live, unarchived thread rows and all matching rollout JSONL files existed.Concrete project A:
13136/13were inside the global rollout-file mtime top-50 window.Workaround test:
LastWriteTimeUtcon the 7 missing project rollout JSONL files.13/13project threads in the global rollout-mtime top-50 window.Concrete project B:
3389,90,93No chatsfor that project.Global diagnostic on the same machine:
11211223750threads in the global top-50:11Important secondary finding:
touch/mtime promotion is only a workaround that redistributes the limited 50 visible slots. It is not a real fix for local history visibility.Expected behavior:
cwd/ workspace root from durable local state.Actual behavior:
No chatseven though their local threads and rollout files exist.Suggested fix direction:
cwdwith pagination.No chatswhen local state contains matching live threads outside the global recent window.FrankZhangRp commentedon May 25, 2026
I can reproduce this on macOS with Codex Desktop
26.519.41501.The affected project has multiple existing local conversations, but the Desktop sidebar shows the project as empty.
The behavior appears tied to the hardcoded global recent-thread window:
limit=50does not include any conversations from the affected project.limit=100includes the missing project conversations.This makes the project appear to have no chats even though the conversations still exist and can be recovered through lower-level local state / direct thread lookup.
The main problem is that this limit does not seem configurable.
50may be reasonable for the initial global recent list, but it is not reasonable as the effective visibility boundary for project history.Expected behavior:
13 remaining items
abhii-roy commentedon Jun 17, 2026
@peterpeirce yes it has been fixed in the latest update.
ashe0047 commentedon Jun 17, 2026
There are still hidden threads on my end in project, dont think its fixed. Can anyone else verify?
Necmttn commentedon Jun 21, 2026
The UI list should be backed by a project-scoped session index, not a filtered recent-global window. Store project key, git root/cwd, thread id, title, updated_at, archived/pinned state, and index status. Search should query that index directly and report skipped/corrupt rows, so old project history looks stale only when the data is actually missing.
Generated with ax.
stephenbaugh commentedon Jun 21, 2026
Hi @ashe0047 asked if other people were having similar issues. I certainly have had the full thread show and now can see more of my active threads, but I am still experiencing a few issues still. Threads seems to randomly disappear. I can not work out if this is due to incorrectly sorting, or some other random issue.
Threads on my desktop computer have reappeared but they don't realiably show if access via the mobile app, even new chats.
I think this all is working better but not fixed. Mobile seems worse, but I hardly use that so it's hard to be specific about what is normal vs broken
ashe0047 commentedon Jun 23, 2026
The conversation list in sidebar seems to have been fixed in the latest version on macos Codex app as I can see all the conversations for each of my project now but i cannot confirm for mobile Codex. The last time i checked, the conversation list in codex mobile is indeed a mess
moayadstar commentedon Aug 2, 2026
I can reproduce this on current Codex Desktop for Windows, with an additional persistence failure after a normal Windows shutdown/restart.
Environment
OpenAI.Codex 26.721.11231.026200.8973CODEX_HOME:%USERPROFILE%\.codexUser-visible sequence
This has happened more than once and interrupts active work because the UI looks as if project history was deleted.
Read-only diagnostic evidence
The core data was healthy:
For the restored project state:
However, only 2 of the 9 real project threads were inside the global top-50 active-thread window. The other 7 were ranked:
All nine real project threads had interactive source
vscode, no agent role, and an existing rollout file. The 56 internal/service/subagent threads consumed most of the recent window.Pinning the nine real threads made them visible under a global Pinned section, but their projects still displayed No chats. After restoring the existing thread-to-project assignments, the conversations appeared under their projects again. No transcript had been deleted.
There was also a separate state-persistence symptom after restart: the desktop project registry/assignments could collapse even though
state_5.sqlite,session_index.jsonl, and rollout files remained intact. An initial post-failure state inspection showed no saved/active roots and no thread hints.Official diagnostics were additionally blocked on this installation:
codex doctor --summary --asciiresolved to the packaged executable under WindowsApps and returnedAccess is denied, both inside and outside PowerShell.Expected behavior
cwdwith pagination, not inferred only from a global recent-50 cache.Privacy
No raw database, session transcript, authentication file, project name/path, or rollout content is attached publicly because these can contain private work. I can provide specifically requested, redacted diagnostic fields if maintainers identify what is needed.
This Windows case independently confirms the global recent-50 failure described in this issue, and suggests it can combine with a restart-time project/sidebar state persistence problem. It also overlaps with #25500 and #26990.
DrunkenAI commentedon Aug 3, 2026
I can reproduce this on the current Codex Desktop for Windows, and the current failure is not limited to old threads.
Environment
26.727.6591.010.0.22631%USERPROFILE%\.codexUser-visible behavior
After restarting Codex Desktop, one local project shows exactly 5 tasks in the sidebar and in the project hover card. Unlike other projects with more history, this project has no Show more control.
Project search also returns no match for the missing tasks.
Most importantly, one missing task is the second most recently updated active local task in that project (updated on 2026-08-02). This rules out the expected explanation that only old history is hidden.
Read-only local evidence
The durable data is intact:
For the affected project:
state_5.sqlite: 8 active, non-archived user threads with the same project cwdsource='vscode',thread_source='user',agent_role IS NULL,archived=0The exact set of five project threads returned by the current recent thread catalog matches the five shown in the sidebar. The three other valid active threads are absent from that catalog. The catalog API also enforces
limit <= 50.The current Desktop bundle still renders project thread lists with
maxItems=5. For this affected project, the project-scoped catalog incorrectly reports no more data, so the UI does not render Show more even though three additional active matching rows exist.Pinning the hidden thread IDs is a partial workaround: it can expose them in the global Pinned section, but it does not correct the project count/history.
Expected behavior
No raw database, session transcript, thread ID, private project name/path, task title, authentication data, or logs are attached publicly. I can provide specifically requested redacted fields if maintainers identify what is useful.
BradGroux commentedon Aug 3, 2026
Adding a current macOS reproduction from Codex Desktop
26.727.51351(build6119) with bundledcodex-cli 0.146.0-alpha.9.2. All diagnostics below were read-only, and project names, paths, titles, messages, and thread IDs are intentionally redacted.Summary
This is still reproducible. The underlying conversation store is healthy, but Desktop exposes only a small recent projection and the newer local thread catalog is not completing its initial build. In practice, entire projects appear to have no history even though their conversations remain intact and directly readable.
Durable-store evidence
PRAGMA integrity_checkreturnsokfor the primary state database.The database and rollout-file counts match exactly, so this is not deletion.
Using a conservative direct-conversation filter:
there are
905active direct conversations.Recent-window evidence
The current Desktop task-list surface rejects a requested limit above 50 with:
A normal call returns exactly 50 rows. In the observed result, 24 of those rows came from a separate managed-agent runtime, leaving less than half of the window for ordinary project work.
Ranking the 905 direct conversations globally by
updated_atgives this boundary:Sanitized project impact:
An older Project A conversation outside the visible list remains directly readable by its known thread ID, returning
notLoadedrather than missing or corrupt.New catalog-layer evidence
The current app also maintains
~/.codex/sqlite/codex-dev.db. Its integrity check isok, but the catalog is incomplete:The 109 catalog rows have source update times only from June 25 through July 17, while the primary state database contains valid activity through August 3.
This suggests the current failure has two related layers:
Expected fix behavior
A durable fix should:
initial_build_completeonly after every page has been consumed and committed.I have not patched the app bundle, changed timestamps, rewritten SQLite state, or modified sidebar metadata. The missing history is currently recoverable by direct thread ID, but there is still no reliable UI path to enumerate it.
creamtea47 commentedon Aug 10, 2026
I can still reproduce this on the current Windows Codex Desktop build, even though the newer
local_thread_catalogis fully populated and healthy.Environment
26.803.5235.00.147.0-alpha.6.510.0.26200)Current symptom
Several registered local projects show No chats, while their active conversations still exist and can be resumed from the CLI. This persists after fully exiting and reopening Desktop.
The affected project names, paths, thread IDs, and titles are redacted below.
Durable-state evidence
state_5.sqlite:codex-dev.db:Three projects that Desktop renders as No chats have the following valid catalog counts:
For each sampled thread:
state_5.sqlitehas an active, unarchived row;local_thread_cataloghas the same thread ID, exact project cwd,host_id=local,model_provider=openai, andmissing_candidate=0;Stronger catalog-reader evidence
I extracted the page-query logic from this installed Desktop build and reproduced its
readManualPageSQL against the samecodex-dev.db. Using the same project root, include/exclude sets, host ID, and manual thread order, the query correctly returns the hidden thread and its title.Desktop nevertheless renders the project as No chats. Sysinternals Handle also confirms that the active Desktop main process has this exact database open:
Changing the sidebar project sort between priority/manual and restarting did not change the result. Rebuilding large sets of
thread-project-assignmentsalso did not help and was rolled back, because it only creates misleading empty project groups.This suggests the current failure is after durable catalog lookup: the renderer/catalog reader is not materializing valid page results into the project list, or is exhausting/caching the project scope as empty before the valid catalog page reaches it.
Reproduction
state_5.sqliteand valid rows inlocal_thread_catalog.Expected behavior
Expanding a project should render/paginate every valid catalog entry matching that project scope. The UI should not display No chats when
local_thread_catalogalready contains matching, non-missing entries.This appears to be the Windows/current-build continuation of the original recent-window problem: the durable per-project catalog now exists and is complete, but older project conversations are still not surfaced by the Desktop UI.
damogallagher commentedon Aug 12, 2026
Reproduced again on 2026-08-12 after a normal, deliberate macOS restart.
Environment:
cli_version: 0.147.0-alpha.6.5Observed sequence:
notLoaded.unavailableHosts: [].A potentially important additional clue: the affected thread reported identical creation and update timestamps:
So
updatedAtdid not advance despite roughly 12 hours of later task activity. Combined with the global recent-50 window, that stale timestamp appears to let a genuinely recent/active task fall outside the loaded set after the app restarts and loses its already-loaded in-memory reference.Expected:
This has occurred periodically, not just once. Private task IDs, paths, titles, and prompt contents are intentionally omitted.
naipi11 commentedon Aug 18, 2026
If older project chats vanish from Desktop after a restart or about a week of inactivity, the data is usually still on disk. Desktop only loads a recent window (often 50 items) and then groups or searches that already-loaded subset.
Method:
codex resume --alland open the missing thread by id or name. If you already have the opaque thread id, opening that id in Desktop also works (it can show as notLoaded, then the task reappears).state_5.sqlitestill has the thread andPRAGMA integrity_checkreturns ok.Evidence: current Windows and macOS reports (including 26.803 / 0.147.0-alpha) show intact local stores plus a 50-item recent projection.
codex resume --allis the supported way to list beyond cwd and recent filtering.Independent community workaround; not an official OpenAI fix.
creamtea47 commentedon Aug 22, 2026
@naipi11 Thank you — this workaround was very useful and worked in my case.
I verified it on Windows with Codex Desktop
26.818.5229.0and CLI0.148.0:state_5.sqlite, andPRAGMA quick_checkreturnedok.One detail from my test: resuming alone refreshed/opened the thread, but did not reliably restore its persistent project assignment. Pinning after resume was the important step for keeping it visible. So this is a very effective recovery workaround, although it does not appear to be a full fix for the underlying project/sidebar indexing issue.
Thanks again for documenting it.
naipi11 commentedon Aug 22, 2026
Thanks for confirming the Windows result. The extra pinning step is useful because resume can refresh the thread without restoring its persistent project/sidebar visibility.
This should still be treated as a recovery workaround, not a fix for the underlying project/indexing issue. If the task becomes hidden again after a restart or resume, preserve the state and report the exact build rather than editing the database.
ReggieCarey commentedon Aug 23, 2026
Reproduced again on macOS on 2026-08-23 with a current ChatGPT/Codex desktop build.
Environment
26.818.313386892unavailableHosts: []Privacy-minimized local evidence
Before testing any workaround, I created and verified a local backup. SQLite
PRAGMA quick_checkreturnedok.At snapshot time:
state_5.sqlite: 718 total thread rows~/.codex/sessions~/.codex/archived_sessionssession_index.jsonl: 302 named index rows before the current investigation updated itThe persisted database and rollout counts agree; this does not look like deletion.
Strong reproduction
limit: 200returns exactly 50 threads.activeidlenotLoadedthread/listcompleting successfully witherrorCode=null, so this is not a sustained app-server transport failure.This demonstrates that both list and search are operating over the recent 50-item projection rather than all persisted top-level threads.
Pin workaround result
I also tested pinning one known omitted, unarchived thread:
So pinning alone, without first resuming/opening the hidden thread, is not a reliable recovery method on this build.
Impact
This is causing real loss of discoverable working context across ongoing fabrication, application, repository, and operational projects. The data remains recoverable only if the user already knows the opaque thread ID or manually queries local SQLite/session files.
Expected behavior
thread/listshould honor pagination beyond 50.No raw logs, databases, private paths, titles, or thread IDs are attached publicly. Redacted diagnostics are available if maintainers request a specific subset.
LiuHangyuWE commentedon Sep 27, 2026
I’m seeing the same behavior in the current ChatGPT/Codex Desktop app.
Once all conversations in a project fall outside the globally loaded recent-conversation window, the project effectively disappears from the Projects UI, even though the project and its conversations still exist and can still be found/accessed manually.
This makes Projects unreliable as a persistent organizational feature, since older projects behave as if they were removed simply because they haven’t been active recently.
Would really appreciate a fix so project visibility is independent of the global recent-conversation limit.