Windows app: older local threads disappear from sidebar and sidebar search after restart while still present on disk
What version of the Codex App are you using (From “About Codex” dialog)?
26.409.20454
What subscription do you have?
ChatGPT Pro
What platform is your computer?
Microsoft Windows NT 10.0.22631.0 x64
What issue are you seeing?
Older local Codex Desktop threads are no longer returned by the sidebar list or sidebar search after restart, even though they still exist in local state on disk.
Observed environment:
- Codex About version: 26.409.20454
- local diagnostics also show: app.version=0.119.0-alpha.28
- Windows 11
- timezone: Europe/Brussels
- observed on 2026-04-12
What I see in the UI:
- after a cold exit and relaunch, the sidebar only shows threads up to about
1wold - older threads are missing from the sidebar
- switching the sidebar to
Chronologicaldoes not restore them - searching for known missing thread ID
019cd29b-9215-7943-ae51-aa9c10dd74b4returns no result
Why this looks like a local-state/indexing bug rather than data loss:
state_5.sqlitestill contains 121 thread rowssession_index.jsonlstill contains older March 2026 thread IDs- on-disk session rollout files still exist
- the missing thread ID above is present locally but not returned by sidebar search
Strong path-normalization signal:
- many
threads.cwdvalues instate_5.sqliteare stored as\\?\C:\... - these can be normalized while Codex is closed
- after reopening Codex, the app writes the
\\?\-prefixed form back again
Relevant counts:
threads_total=121- first repair:
cwd_prefixed_before=92 - first repair:
cwd_prefixed_after=0 - after reopening Codex: prefixed
threads.cwdrows returned to92 - first repair:
index_lines_before=124 - first repair:
index_unique_before=118 - first repair:
index_duplicate_ids_before=5 - first repair:
index_lines_after=121
What steps can reproduce the bug?
- Fully exit Codex Desktop on Windows so no Codex process remains.
- Launch Codex Desktop again.
- Wait for the sidebar to load.
- Observe that only recent threads are visible; the oldest visible threads are about
1wold. - Switch the sidebar to
Chronological. - Search for known missing thread ID
019cd29b-9215-7943-ae51-aa9c10dd74b4. - Observe that the sidebar search returns no result.
- Inspect local state:
state_5.sqlitestill contains older threadssession_index.jsonlstill contains older thread IDs- older rollout session files still exist under
%USERPROFILE%\.codex\sessions
Repair attempts that did not fix it:
- Rebuilt
session_index.jsonl - Normalized
threads.cwdinstate_5.sqlite - Patched workspace-root state
- Reset package-local cache
- Cleaned duplicated workspace roots
- Reinstalled Codex Desktop
Result after all of the above:
- older threads still do not appear in the sidebar
- older threads still do not appear in sidebar search
- after relaunch, prefixed
threads.cwdvalues are regenerated
Representative local examples:
- missing thread still present locally:
- id=
019cd29b-9215-7943-ae51-aa9c10dd74b4 - created_at=
2026-03-09 12:38:56 UTC - prefixed non-OneDrive example:
- id=
019cf6d0-b928-7231-a20f-c732d658d315 - created_at=
2026-03-16 13:23:19 UTC - cwd redacted=
\\?\C:\dev\<project_redacted> - plain non-OneDrive example:
- id=
019d2479-db67-7173-b7a2-39918425f817 - created_at=
2026-03-25 10:10:59 UTC - cwd redacted=
C:\dev\<project_redacted>
This does not appear to be OneDrive-only:
- older missing threads include both OneDrive and non-OneDrive paths
- they also include both
\\?\C:\...and plainC:\...path forms
What is the expected behavior?
All local threads should remain visible and searchable in the Codex Desktop sidebar after restart.
Specifically:
- restarting Codex should not hide older local threads
- switching the sidebar to
Chronologicalshould still show those threads - sidebar search should return a locally existing thread ID or title
- Codex should not regenerate path state in a way that breaks thread visibility
Additional information
Additional diagnostics:
logs_2.sqliteshows repeatedthread/resumeactivity around launch/resume windows- no explicit log line was found saying “cwd rewritten”, but the before/after SQLite state shows that the prefixed
cwdvalues are regenerated after app launch - local diagnostics include:
app_server.client_version="26.409.20454"app.version=0.119.0-alpha.28
Artifacts available on request:
%USERPROFILE%\.codex\state_5.sqlite%USERPROFILE%\.codex\session_index.jsonl%USERPROFILE%\.codex\logs_2.sqlite%USERPROFILE%\.codex\sessions%USERPROFILE%\.codex\archived_sessions
I also have a redacted sidebar screenshot showing that the oldest visible items are labeled 1w, plus redacted exports of the thread state, session index, and launch-log summary.
<img width="1150" height="382" alt="Image" src="https://github.com/user-attachments/assets/3e73c6cc-3faf-4373-a82d-06d7124187d5" />
20 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Codex Action suggested possible duplicates: #17304, #16901, #17317, #17354, #16095.
I reviewed them. They look related, but I don’t think this issue is an exact duplicate:
threads.cwdto\\?\C:\...after repair, plus sidebar search failing for a known locally present thread ID.So I’m keeping this open as a Windows-specific variant unless maintainers prefer consolidation.
I can reproduce a related Windows path-normalization/sidebar issue on Codex Desktop
26.409.20454.Environment (redacted):
C:\Users\<redacted>\Desktop\CryptoRepro variant:
Cryptoalready present in the left workspace list.Cryptofolder (instead of starting from the existing left-sidebar workspace entry).Observed:
Cryptoworkspace entries.C:\Users\<redacted>\Desktop\Crypto\\?\C:\Users\<redacted>\Desktop\CryptoCryptoentry can showNo threadseven while active/recent threads exist in the other entry.Local evidence (redacted):
.codex/sessions.state_5.sqlite.\\?\...\Cryptocwd variant.Expected:
Cryptoworkspace with all threads.My case, if there something useful here (analysed by Codex):
Summary
Some Codex threads disappear from the Windows app sidebar and cannot be found via search, even though the thread data still exists locally on disk and is still present in the local session index.
This appears to be a UI/sidebar/search indexing or visibility issue rather than data loss.
Environment
Expected behavior
Threads that still exist locally and are present in the local session index should remain visible in the sidebar and be discoverable through search, unless they are explicitly archived and intentionally hidden.
Actual behavior
A thread expected under a title like Review PaymentTerminal.cs / Review PaymentTerminal.cs for bugs was missing from the sidebar and could not be found by search.
However, the thread still existed in:
Evidence
Matching active threads found in C:\Users\veskar1\.codex\session_index.jsonl:
Title: Review PaymentTerminal.cs for bugs
Title: Review PaymentTerminal.cs for bugs
Matching local thread files:
Opening prompts in those files:
Also observed:
Impact
Important historical threads can appear lost even though local data is intact, which makes recovery difficult and reduces trust in sidebar/search history.
Notes
This looks like one of:
I can reproduce a related Windows Codex Desktop sidebar bug on the current Store build, with a WSL-mirrored workspace.
Environment
26.415.4716.00.121.00.67.68Microsoft Windows NT 10.0.26200.0 x64What I see
In Codex Desktop, the
ios-gamesec-reproject appears in the left sidebar but showsNo chats.However, those chats still exist locally and can still be resumed from CLI/Pi.
This is not data loss:
threads.cwdvalues for the missing chatsLocal evidence
From local diagnostics:
backfill_stateinstate_5.sqliteiscompleterollout_pathfiles referenced by thread rows still exist on disk59non-archived threads whosecwdexactly matches:No chatsRepresentative local thread still present:
e605a6f5-0e5c-4cb6-b70e-cb43b57d5a48Another older thread visible via local state but not surfaced in the desktop sidebar:
019d2002-f300-7240-a50f-92b2af07d633Important detail that points to sidebar hydration / pagination
This does not look like a path mismatch anymore.
For the exact affected workspace path above:
5950bycreated_at_ms:22areexecthreadsThis seems consistent with the broader report that the desktop sidebar is hydrating from a limited recent slice instead of the full project-scoped local thread set.
Logs
Desktop logs show successful
thread/listresponses, while the UI still fails to show the expected chats for the project.I also saw a separate renderer/app-state error during local investigation:
Conversation state not found conversationId=019da807-60df-7a62-b563-48b9aacbfb51Representative log file on my machine:
%LOCALAPPDATA%\\Packages\\OpenAI.Codex_2p2nqsd0c76g0\\LocalCache\\Local\\Codex\\Logs\\2026\\04\\19\\codex-desktop-328faca3-f58d-408b-b146-2dc0eb8c3fcd-33448-t0-i1-231542-0.logExpected behavior
If a saved workspace root exactly matches
threads.cwdfor local non-archived threads, the project should show those chats in the desktop sidebar.Actual behavior
The project is listed, but the sidebar still shows
No chatseven though the local thread store is populated and CLI/Pi can still resume the threads.Artifacts available
I can provide redacted copies of:
%USERPROFILE%\\.codex\\state_5.sqlite%USERPROFILE%\\.codex\\session_index.jsonl%USERPROFILE%\\.codex\\sessionsI can reproduce a related Codex Desktop sidebar failure on macOS, and the pinned-chat behavior seems like a useful clue.
In my case, this does not look like data loss:
~/.codex/state_5.sqliteintegrity checks pass.session_index.jsonl, and rollout JSONL files.thread/listrequests for the affected project roots return the missing chats.What the UI shows:
No chats.The local desktop state split seems relevant:
pinned-thread-idsremains correct.active-workspace-roots,project-order,projectless-thread-ids, andthread-workspace-root-hints.So this looks like a Desktop sidebar hydration/cache bug rather than an app-server
thread/listfailure. Pinned chats survive because they are keyed directly by thread ID; normal/project chats can vanish when cached workspace membership or thread-to-workspace hints drift.Suggested fix direction: treat sidebar membership caches as advisory. On launch/sidebar refresh, rehydrate saved workspace/project sections from authoritative
thread/listresults, follow pagination for project-scoped lists, normalize workspace identity consistently, and rebuild/discard stale hints instead of renderingNo chats.---
Follow-up after deeper local investigation: I think my macOS case is primarily a sidebar hydration/pagination issue, and related but not identical to the Windows path-canonicalization reports above.
Direct project-scoped
thread/listcalls return the missing chats for the affected project roots. However, the Desktop sidebar appears to build project contents from a limited global recent-thread slice. On my machine, newer automation/companion threads from another workspace push these project chats outside that slice, so the saved project sections remain visible but render asNo chats.So there may be at least two overlapping failure modes here:
\?\C:\...pathsA robust fix likely needs both: consistent workspace identity normalization, plus project-scoped/sidebar pagination so saved projects are populated from their own
thread/listresults rather than from one recent global page.Similar problem, potentially related. And I haven't really seen what exactly triggers it. But typically, I observe it after signing out and signing in with a different account. Not sure though whether this is triggering it, or the chat already disappeared before that.
This happened in stages for me, slowly more and more chats are not shown anymore (majority is still there, luckily). Potentially also affecting the older sessions (as if there was some fixed limit of how many sessions to show, ...).
Retracted by author request. Will repost manually if needed.
Adding another Windows data point from a current local investigation. This looks like the same issue class, but with a useful extra detail: after a manual DB repair the visible/missing projects can effectively invert, which points to two overlapping failure modes rather than a single stale
cwdrow.Environment / storage checked:
%USERPROFILE%\.codexstate_5.sqlite,.codex-global-state.json, and rollout JSONL files under.codex\sessionscodex-cli 0.132.0User-visible behavior:
No chats, even though active local thread rows still exist for those projects.Local DB evidence after the latest refresh:
TOTAL_APP_VISIBLE_CANDIDATES=231
TOP50=50
Representative affected projects:
normalized visible rows: 1
exact plain visible rows: 0
first rank in global recent list: 58
normalized visible rows: 10
exact plain visible rows: 0
global ranks: 80-89
normalized visible rows: 11
exact plain visible rows: 0
global ranks: 59-69
normalized visible rows: 21
exact plain visible rows: 21
global ranks: 153-173
normalized visible rows: 44
exact plain visible rows: 33
variants: both plain D:\... and \\?\D:\...
So there are two separate signals:
This is why the failure looks cyclic from the user side: fixing cwd helps one layer, but then the global recent-page/sidebar hydration limit still hides projects; trying to promote or touch rows makes those projects visible at the expense of others, so the visible/missing set appears to invert.
This seems consistent with #18640/#19873/#23193/#22796. The sidebar likely needs both fixes:
From the local evidence, this is not data loss. The rows and rollout files are still present; the Desktop sidebar is failing to surface/group them reliably.
This looks bigger than sidebar search. For resumability, losing discoverability is very close to data loss. In MartinLoop we ended up separating the canonical session receipt from rebuildable UI indexes: immutable session/thread identity plus normalized workspace metadata at write time, then any sidebar/search index can be regenerated from that source of truth.
If
state_5.sqliteandsession_index.jsonlstill know the thread exists, I would love an explicit repair/reindex path and a visible "some local threads are unavailable due to index mismatch" warning. Students get hit especially hard here because old receipts disappear right when they need to resume prior work or prove what the model did.What version of the Codex App are you using (From “About Codex” dialog)?
26.519.21041
What subscription do you have?
Pro
What platform is your computer?
Microsoft Windows 11 NT 10.0.26200.0 x64
What issue are you seeing?
The Codex App sidebar on Windows intermittently hides existing local threads and sometimes makes existing threads impossible to open from codex:// links.
Feedback ID: 019d881f-670a-7e21-a6bf-987d5dd75aed
Symptoms:
I have around 80+ local Codex threads across several projects.
The local Codex state database still contains the threads, and their rollout JSONL files exist.
The sidebar shows only a subset of threads.
Sometimes project groups become empty and threads move to the generic Chats area.
Sometimes previously visible threads disappear after restart/reboot, while other older threads appear.
Some codex://threads/<thread_id> links do not open the target thread unless that thread is currently visible/loaded in the sidebar.
Restarting Codex and rebooting Windows did not fix it.
Changing sorting to Chronological did not fix it.
One observed error when trying to resume a thread:
cannot resume running thread 019e4751-d521-7290-9627-e501f3d7d2d3 with stale path: requested \\?\C:\Users\<USER>\.codex\sessions\2026\05\21\rollout-2026-05-21T00-36-45-019e4751-d521-7290-9627-e501f3d7d2d3.jsonl, active C:\Users\<USER>\.codex\sessions\2026\05\21\rollout-2026-05-21T00-36-45-019e4751-d521-7290-9627-e501f3d7d2d3.jsonl
This looks like either:
a sidebar pagination/limit/virtualization bug;
a state synchronization bug between local DB, global state, and session files;
or a Windows path normalization bug (\\?\C:\... vs C:\...) that prevents resume.
What steps can reproduce the bug?
Use Codex App on Windows with many local threads, approximately 80+.
Organize threads across multiple projects/workspaces.
Close and reopen Codex App, or reboot Windows and open Codex again.
Open the left sidebar and check project groups.
Observe that only part of the existing threads are visible.
Try opening an existing hidden thread through a deep link, for example:
codex://threads/019e4751-d521-7290-9627-e501f3d7d2d3
In some cases the thread does not open, even though the local state DB still has it and the rollout JSONL exists.
In one case Codex showed a stale path error caused by different Windows path forms:
\\?\C:\Users\<USER>\... vs C:\Users\<USER>\...
I also generated a local HTML index directly from the Codex local state DB as a workaround. It confirms that the threads exist locally, but the app sidebar and/or deep links do not reliably expose them.
What is the expected behavior?
All existing local threads should remain discoverable and openable.
Expected:
The sidebar should show all active threads, or provide reliable pagination/search if there is a display limit.
Project groups should not randomly become empty after restart.
Existing threads should not move unpredictably between project groups and generic Chats.
codex://threads/<thread_id> should open any existing local thread regardless of whether it is currently visible in the sidebar.
Windows path normalization should treat \\?\C:\... and C:\... as the same session file when resuming a thread.
Additional information
Related/possibly similar issue:
https://github.com/openai/codex/issues/13846
Feedback ID:
019d881f-670a-7e21-a6bf-987d5dd75aed
Local observations:
Codex local DB: C:\Users\<USER>\.codex\state_5.sqlite
Session files: C:\Users\<USER>\.codex\sessions\...
App logs: C:\Users\<USER>\AppData\Local\Codex\Logs\...
The issue persisted after Codex restart and Windows reboot.
A local export from the DB can list the missing threads, so this does not look like deleted data.
That stale-path error is the strongest clue in the thread so far. If resume treats
\\?\\C:\\...andC:\\...as different session locations, the sidebar/search miss and the deep-link miss can come from the same broken identity boundary.The repair shape I'd want is:
That way a bad path form can make a receipt noisy, but it cannot make an existing local thread undiscoverable.
One more data point that seems to support this identity/hydration hypothesis:
After updating the CLI to 0.133.0 and running:
codex resume --all <thread-id>
the same original thread became visible again in the Codex Desktop app/sidebar. No copied replacement thread was created; it was the original thread ID.
So the local thread/session is present and resumable by CLI, but Desktop can miss it until the CLI resume path touches or rehydrates the session state.
This makes the issue look less like data loss and more like a Desktop sidebar/deep-link hydration problem around canonical thread identity, workspace/path normalization, or recent/project-scoped indexing.
That
codex resume --all <thread-id>data point is useful because it suggests the canonical thread state is still healthy and the CLI path can rehydrate it by thread id. If that is true, Desktop should probably do the same thing on deep-link open and sidebar repair:thread_idfirstThat would make a bad workspace hint or stale path form noisy, but not able to hide an otherwise healthy local thread.
Adding a current Windows datapoint after the latest Codex Desktop update.
This still reproduces for me. Local thread state appears healthy: the threads exist in state_5.sqlite / rollout files, and my local state-db export can enumerate the active threads. The Desktop sidebar still behaves like a bounded recent window: when an older valid thread is made visible/resumed, another valid thread disappears from the sidebar.
This creates a recovery loop:
Related path signal also still appears on Windows:
requested path uses C:\...
active path uses \\?\C:\...
These appear to be treated as different session locations in some resume/deep-link paths.
Expected behavior:
Codex for Windows app loses visible project chat children after a project is collapsed and later re-expanded. The session JSONL files remain present and valid under %USERPROFILE%\.codex\sessions. Ctrl+G can find the missing sessions, but they will not display when they are clicked from the Ctrl-G. Codex itself can toggle the pinned state when asked and that makes them visible under Pinned, but they do not reappear under their original project. This indicates a stale or corrupted project-to-session sidebar index, not deleted session data.
Once they are shown in Pinned, you can unpin them, and they reappear in the Project.
But, after restoring all the chats this way (prompting Codex to do it), After closing down Codex with collapsed projects again. Upon restart all those chats are missing again.
I am seeing the same class of issue on Windows after a newer Codex Desktop update.
Environment:
OpenAI.Codex_26.602.4764.0_x64__2p2nqsd0c76g0%USERPROFILE%\.codexObserved behavior:
state_5.sqliteand%USERPROFILE%\.codex\sessions\YYYY\MM\DD\rollout-*.jsonl).No conversations, or only a small subset of conversations.Additional diagnostics from this machine:
threads.cwdvalues can be rewritten between normal paths and extended Windows paths like\\?\C:\....Impact:
This looks like data loss to users. In project-based workflows, hidden conversations cause loss of work continuity because the user relies on the left sidebar project folders to remember active ideas and tasks.
Expected behavior:
\\?\C:\...andC:\...should be treated as the same workspace root for grouping.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.
Thanks for the macOS datapoint. My Windows case looks very similar.
On my side, this still does not look like data loss:
state_5.sqliteand the rollout JSONL files still contain the missing threads. Manual repairs can temporarily change which conversations are visible, but after restart/reindex the sidebar can still hide older project threads again.So I agree with your conclusion: current behavior feels like partial recovery at best. A durable official local reindex/recovery command would be very helpful, ideally rebuilding project/sidebar history from the canonical local thread/session state instead of relying on the current sidebar cache or recent-thread window.