Repository navigation
Codex Desktop: recent local project threads are missing from sidebar/search although session_index and read_thread can load them #30385
Description
Summary
Codex Desktop on Windows is not showing several recent local project threads in the project sidebar or thread search, even after multiple app restarts. The threads are not lost: they exist on disk, are present in ~/.codex/session_index.jsonl, and can be loaded directly by thread id via read_thread. However, list_threads / sidebar search does not return them.
This looks like a stale or divergent local sidebar/search index rather than data loss.
Environment
- OS: Windows
- Codex surface: Codex Desktop app
- Observed date: 2026-06-28, timezone Europe/Prague
- Workspace/project root:
C:\Projects\ai-assistent - Active local Codex state files observed:
~/.codex/session_index.jsonl~/.codex/sessions/2026/06/27/*.jsonl~/.codex/state_5.sqlite
- App/plugin version signal observed in local config:
BROWSER_USE_CODEX_APP_VERSION = "26.623.42026"
Impact
The project sidebar makes it look like the last ~12 hours of work/chats are missing, even though the underlying sessions and repository changes exist. This is confusing and risky because the user may believe work was lost or may repeat work unnecessarily.
What I already tried
- Restarted Codex Desktop several times.
- Reopened the same project.
- Verified that the repository work itself is intact.
- Verified local session/index evidence.
The problem persists after restart.
Evidence: repository work exists
In the local project C:\Projects\ai-assistent, the last ~12 hours of work produced real commits and current-state docs. For example:
786cb16b 2026-06-27 22:56:34 +0200 Record P29 privacy tuning evidence
4d80f9a2 2026-06-27 22:44:32 +0200 Implement P29 privacy gate tuning and canary closure
e7985dd8 2026-06-27 21:51:54 +0200 Record P28 canary expansion evidence
77320902 2026-06-27 21:44:17 +0200 Implement P28 controlled provider canary expansion
27efbe3a 2026-06-27 20:00:30 +0200 Record P27 DGX provider canary evidence
d4f00301 2026-06-27 19:52:09 +0200 Pass P27 canary config through DGX app compose
1a83ed01 2026-06-27 19:44:26 +0200 Implement P27 provider canary gate
444bf496 2026-06-27 17:27:44 +0200 Record P25 deploy evidence
95e9670a 2026-06-27 17:19:55 +0200 Implement P25 offline cloud handoff review
75ba8ec4 2026-06-27 14:49:55 +0200 Record P24 deploy evidence
65586d1c 2026-06-27 14:25:36 +0200 Implement P24 durable fulfillment and local faithfulness
git status --short --branch reports:
## main...origin/main
Evidence: sessions exist in session_index.jsonl
The following entries are present in ~/.codex/session_index.jsonl:
[
{
"id": "019f0986-2794-7af1-aad1-8c96afb880f1",
"thread_name": "Dokonči P25 offline handoff",
"updated_at": "2026-06-27T14:40:24.2132668Z"
},
{
"id": "019f0a0c-f555-7523-a9c2-e692ebd9106a",
"thread_name": "Implementuj P27 canary approval",
"updated_at": "2026-06-27T17:07:41.8963268Z"
},
{
"id": "019f0a7a-bf7d-7ac2-8f3a-d5a9cde3dd83",
"thread_name": "Implementovat P28 canary rozšíření",
"updated_at": "2026-06-27T19:07:33.7527505Z"
},
{
"id": "019f0aaf-4ff1-7283-993f-c36fd4380f6e",
"thread_name": "Implementovat P29 privacy tuning",
"updated_at": "2026-06-27T20:04:57.4723878Z"
}
]Corresponding JSONL files also exist under ~/.codex/sessions/2026/06/27/, for example:
~/.codex/sessions/2026/06/27/rollout-2026-06-27T22-04-54-019f0aaf-4ff1-7283-993f-c36fd4380f6e.jsonl
~/.codex/sessions/2026/06/27/rollout-2026-06-27T21-07-29-019f0a7a-bf7d-7ac2-8f3a-d5a9cde3dd83.jsonl
~/.codex/sessions/2026/06/27/rollout-2026-06-27T19-07-34-019f0a0c-f555-7523-a9c2-e692ebd9106a.jsonl
Evidence: direct thread reads work
Directly reading those thread IDs works. For example, read_thread for 019f0aaf-4ff1-7283-993f-c36fd4380f6e returns:
id: 019f0aaf-4ff1-7283-993f-c36fd4380f6e
title: Implementovat P29 privacy tuning
status: notLoaded
cwd: C:\Projects\ai-assistent
createdAt: 2026-06-27 22:04:54 +02:00
updatedAt: 2026-06-27 22:57:12 +02:00
turn status: completed
final answer present
The same was true for P25, P27, and P28 thread IDs. They all have cwd=C:\Projects\ai-assistent and completed final answers.
Actual behavior
Project sidebar/search does not show these recent threads.
list_threads without a query returns the current thread and some older project threads, but omits the P24-P29 recent threads listed above.
Search also misses them:
list_threads(query="P29") -> []
list_threads(query="Implementovat P28") -> []
list_threads(query="Dokonči P25") -> []
list_threads(query="Implementuj P27") -> []
This is despite read_thread(threadId=...) being able to load them directly.
Expected behavior
Any local thread that:
- exists under
~/.codex/sessions, - is present in
~/.codex/session_index.jsonl, - has
cwdunder a saved/active project root, - is not archived,
- and can be loaded by
read_thread
should appear in the corresponding project sidebar and be discoverable by thread search after restart.
Possible contributing factor
The missing recent threads were created from requests where the user supplied the main prompt as an attached/pasted text file. In read_thread, the initial user message is attachment-oriented, and the thread preview can be empty even though the generated title is present.
Example initial user message shape, paraphrased:
The attached pasted text file(s) contain the user's request. Read and act on that content.
Hypothesis: attachment-only / empty-preview threads may be written to session_index.jsonl and readable by id, but omitted from the sidebar/search index or hydration query.
Related issues that may be connected
I found several possibly related open issues while checking for duplicates:
- Codex Desktop local thread can be hidden/stale when state_5.sqlite and session_index.jsonl drift on Windows #22452
- Codex Desktop Projects sidebar shows "No chats" for projects with older non-archived conversations #25500
- Codex Desktop project sidebar and search omit older notLoaded local project threads #26634
- Codex Desktop hides active local threads from sidebar/search while state_5.sqlite still marks them unarchived #27159
- Codex Desktop project sidebar does not hydrate older project threads, even though thread/list with cwd can return them #27314
- Codex Desktop Windows 26.616: local project threads appear, but opening one marks cwd missing and collapses project sidebar to No chats #29130
- Codex Mac sidebar hides existing unpinned threads after update #29550
This report may be a duplicate, but it includes a concrete reproduction where the same thread IDs are present in session_index and readable by direct thread id while list_threads/search returns nothing.
Suggested investigation points
- Compare the data sources used by:
- project sidebar hydration,
list_threads,- thread search,
- direct
read_thread.
- Check whether attachment-only threads or empty-preview threads are filtered out.
- Check whether
cwd/ workspace root mapping is backfilled correctly for threads that arenotLoadedbut present insession_index.jsonl. - Check for drift between
session_index.jsonlandstate_5.sqliteafter long-running completed local threads and app restart. - Consider adding a repair/reindex action for local Desktop thread/sidebar state.
Workaround
If the user knows the thread ID, direct thread loading works. But the normal UI/sidebar/search path is currently not enough to discover the affected threads.
Activity
github-actions commentedon Jun 27, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
szechner commentedon Jun 27, 2026
Additional observation: around the same time, ChatGPT iOS app / Codex mobile also failed to load conversation contents for the same account, while ChatGPT web continued to work. This may be a separate client-side/mobile loading issue, but it suggests the problem might not be limited to the desktop sidebar UI.
theodoreye001 commentedon Jun 29, 2026
I’m seeing a very similar issue on Windows with Codex Desktop, but my case looks more severe than the original report.
In my case, this is not only “recent local project threads are missing from sidebar/search while they can still be loaded directly”. I also see signs that the local sidebar catalog/migration is incomplete, and many historical session files appear to be missing from disk.
Local evidence from my machine:
C:\Users\<user>\.codex\state_5.sqlitestill contains205rows in thethreadstableC:\Users\<user>\.codex\sqlite\codex-dev.dbhaslocal_thread_catalog = 0local_thread_catalog_sync_stateis('local', NULL, 0, 19)initial_build_complete = 0C:\Users\<user>\.codex\sessionsonly contains4rollout-*.jsonlfiles, and all of them are from2026-06-29C:\Users\<user>\.codex\archived_sessionscontains0filesI also checked the older metadata snapshots:
C:\Users\<user>\.codex\sqlite\state_5.sqlitestill has212thread rowsSo this seems related to the same general family of bugs discussed here, but with an extra failure mode:
rollout-*.jsonlfiles are no longer present in the expected session directoriesFrom the user perspective, the result is:
This has reportedly happened repeatedly after Codex updates on the same Windows machine.
If helpful, I can provide more exact local state details privately, but I wanted to confirm that this is not just a one-off missing-sidebar-entry case. It may be a broader Windows migration/indexing/storage issue affecting local thread recovery.
This feels worse than a pure UI indexing bug, because in my case the historical session files themselves also appear to be missing.
branmckeown commentedon Jul 6, 2026
Adding another Windows Codex Desktop data point that matches this issue.
Observed on 2026-07-05 after shutting down/restarting the computer:
Visibility, did not surface the thread.list_threads(query="Visibility")returned only the active troubleshooting thread, not the missing project thread.read_threadby the recovered ID loaded it successfully.status.type = "notLoaded", an empty preview, and belonged to the expected project workspace.Expected behavior: a local project thread that still exists and whose title matches the search query should appear in Codex Desktop sidebar/search after restart, or the app should repair/reindex local thread metadata automatically.
Actual behavior: the thread was recoverable only by inspecting local Codex state and using the direct thread ID.
I am intentionally omitting the specific local path and thread ID from this public comment, but this was reproducible enough to make the user think the agent chat had been deleted.
quantuan125 commentedon Jul 6, 2026
Any update on this? Experiencing similar issue
Northern-Summer commentedon Jul 6, 2026
I believe my newly filed issue #31259 is most likely a duplicate of this one, with one additional diagnostic clue that may help narrow the trigger condition.
Additional observation from a separate Windows Codex Desktop case on 26.623.13972.0:
title/previewvalues that looked like body content or a pasted first-user-message summary, rather than a short thread titleThat makes this look even more like a sidebar/list registration or hydration failure on top of existing local thread data, rather than data loss.
Issue #30644 also looks closely related, because it reports stale or mismatched title/preview metadata on a live thread that is not visible in the sidebar. My current guess is that these reports are all part of the same bug family, with malformed or stale thread-summary metadata being one possible trigger.
joshmouch commentedon Jul 22, 2026
I can reproduce the same failure through the VS Code extension on macOS.
Environment
openai.chatgpt26.5715.61943The extension registers a VS Code chat-session item provider and requests the Codex app server with:
{ "limit": 50, "cursor": null, "sortKey": "created_at", "archived": false, "useStateDbOnly": true }Observed state:
~/.codex/session_index.jsonlcontains valid local sessions updated on 2026-07-20, including019f8104-194c-74f1-8c4c-9cefe5bfc4d0and019f7fcb-d204-70e1-be7e-e39c0cd03172.~/.codex/sqlite/codex-dev.dbtablelocal_thread_catalog.This is not a VS Code filter issue. The state-only catalog is stale, and the IDE has no supported refresh or fallback path. A fix appears to require either reliable reconciliation of
local_thread_catalogfrom the session index, or a safethread/listfallback/refresh when the state-only catalog is stale.Related UX detail: the extension requests
sortKey: "created_at"and uses the returned creation time for session timing, so an actively updated old session displays its original age rather than its most recent update.joshmouch commentedon Jul 22, 2026
Correction / narrower root cause from inspecting the current VS Code provider:
The primary list-ordering defect is not merely a stale-catalog fallback. The provider makes exactly this bounded request:
{ "limit": 50, "cursor": null, "sortKey": "created_at", "archived": false, "useStateDbOnly": true }It then maps only
createdAtto the VS Code session item:So when VS Code is set to Updated, it can sort only among the provider's already-truncated 50 creation-ordered candidates; current sessions older than that creation cutoff are never returned to VS Code. The provider also does not supply a last-updated timestamp in its session item.
The stale
local_thread_catalogevidence still matters for sessions absent from the state-only catalog, but thecreated_at+limit: 50request independently explains why an Updated sort does not reveal many older-but-recently-active sessions.Could a maintainer confirm the intended
thread/listcontract for IDE history? If the intended behavior is recent activity, I would like to contribute a focused PR, with tests, to request/update byupdated_atand propagate the correct timing metadata (or implement the maintainer-preferred equivalent). I understand from CONTRIBUTING that an invitation is required before opening the PR.joshmouch commentedon Jul 22, 2026
Scope correction: this issue is specifically about Codex Desktop, while my VS Code extension findings belong in a separate report. Please treat my earlier comments here only as related evidence about the shared
thread/list/ state-catalog behavior; I am filing the VS Code-specific report separately so the extension owner can triage it.boombx403-byte commentedon Aug 18, 2026
Hi @szechner, your report looks related to a local session discovery/inventory gap rather than necessarily a lost rollout. I've released Codex Rescue Alpha5, a local read-only diagnostic tool that performs filesystem-first discovery across active and archived rollouts and cross-references SQLite/index metadata without modifying any state.
If you still have the affected local Codex directory, you can inspect it via:
No raw files or databases are needed. If you choose to share output, please review and sanitize any private repository paths or names first.
StreamVi commentedon Aug 25, 2026
Recurrence: active Codex Desktop chat disappeared during a long-running turn (2026-08-26)
This happened again on Windows while an active Codex Desktop thread was still doing multi-step tool work. The chat disappeared from the Desktop UI/sidebar before the task had finished, even though the agent turn/context continued.
Environment
6.6.114.1-microsoft-standard-WSL20.130.0-alpha.5Observed
Expected
The active thread should remain visible and selectable throughout a long-running turn. Context compaction, background tool activity, and sidebar/index refreshes must not remove its UI entry.
It may be useful to inspect sidebar/thread-list invalidation and local catalog reconciliation around context compaction and long-running active turns, in addition to the stale-catalog cases already documented here.
For privacy, I am omitting the thread ID, workspace/project paths, customer/production data, and tokens.
mmmd3d-source commentedon Sep 3, 2026
I can reproduce this issue family on Windows Codex Desktop with agent-created tasks, so the trigger does not appear to be limited to pasted-text attachment starts.
For affected tasks:
A reliable recovery was to send one ordinary direct user-role text message to the already-hidden task. After that message, the missing visibility metadata was populated and the task became visible again. No manual database edit was needed. We repeated this recovery across multiple affected tasks, and pilot tasks remained visible after full Desktop restarts.
This corroborates the later-inline-follow-up observation in #35249 and may be relevant to the reserved-thread metadata staging work in #38819. It suggests that a later genuine user message triggers a metadata backfill/upsert path that the initial agent-created task path misses.
It would be useful to apply the same backfill automatically during task creation or Desktop sidebar hydration for intact, unarchived tasks, rather than requiring a user message.
znbsf commentedon Sep 4, 2026
Adding a current Windows data point for the agent-created worktree path.
Environment
26.901.2854.00.153.026200Reproduction and observed state
Two tasks were created through the Codex App
create_threadtool for the same saved local Git project, each using its own Codex-managed worktree.Both creations progressed past the pending
clientThreadIdstage and produced canonical thread IDs. For both affected tasks:list_threads(limit=50)does not return it;read_threadby canonical thread ID succeeds and reportsstatus.type = "notLoaded";client-new-threadto canonical-thread binding, the thread-to-project assignment, and the thread description;The correct project was selected and expanded while reproducing this. No local Codex state files were edited.
This appears to rule out, for this reproduction, a task that never materialized, an unresolved
clientThreadId, accidental archiving, a missing project assignment, or loss of the rollout/worktree. The remaining failure looks like sidebar/list eligibility metadata not being populated or refreshed during the agent-created worktree path, or the Desktop catalog ignoring the already-persisted association. That is an inference, not a confirmed root cause.This aligns closely with the 2026-09-03 agent-created-task comment above. One additional distinction is that direct navigation alone does not repair visibility. I did not test the reported ordinary direct user-message recovery path, so I cannot confirm whether it backfills the missing metadata in this case.
I also confirmed that the running
0.153.0core contains the merged work from #38819, #38940, and #39523 by Git ancestry, so the symptom remains reproducible after those backend metadata/project/empty-preview changes.All task IDs, local paths, project names, prompts, account identifiers, and raw state contents are intentionally omitted.
dimasyankauskas commentedon Sep 8, 2026
Adding a current macOS data point that closely matches the 2026-09-04 agent-created-task reproduction, but this case used the saved project checkout directly rather than a Codex worktree.
Environment
Reproduction
Sanitized local metadata
Before the pin workaround, the legacy thread row showed:
The local_thread_catalog row already existed and showed:
No thread ID, project name/path, prompt, or account data is included here.
Expected
An intact, active, unarchived task created for a saved local project should appear automatically in that projects chat list and in list_threads. A manual pin by hidden canonical ID should not be required for discovery.
Actual / likely boundary
The rollout and catalog row exist and direct read/navigation work, but the normal sidebar/list path omits the task until a direct pin forces visibility. This suggests that the agent-created local-checkout path is not completing sidebar eligibility or project metadata backfill. The empty project_id / conversation_origin, pending_observed_title = 1, and has_user_event = 0 may be useful clues. That root-cause interpretation is an inference, not confirmed.
This reproduces on current macOS/Desktop and extends the existing agent-created-task evidence beyond the Windows worktree path.
dimasyankauskas commentedon Sep 8, 2026
Follow-up from the same macOS machine: a rolling 10-day local inventory strengthens the agent-created-task diagnosis.
This suggests the common boundary is the agent-created task registration/hydration path rather than deletion, archiving, approval state, or a single project/worktree type. This remains an inference from local metadata, not a confirmed implementation root cause.
Project names, local paths, task IDs, prompts, and raw database contents are intentionally omitted.
MacSiem commentedon Sep 30, 2026
Additional macOS reproduction: pin/navigation receipts succeed but the task remains absent — 2026-09-30
Posted by a Codex agent with the account holder's explicit authorization.
Environment: Apple Silicon macOS; installed Desktop bundle
26.928.21956, build12404; affected session runtime0.159.2. These versions were read from the installed bundle and session metadata.An existing Desktop coordinator created a separate local engineering task. The user reported that it was missing from the sidebar. Session metadata identifies it as a Desktop session (
originator: Codex Desktop,source: vscode), with no parent thread ID; this is not an in-process subagent or CLI-created replacement.Observed through the native Desktop tools:
read_threadwith the exact task ID succeeds and returns the active task and actual work history.list_threads({limit: 30})omits that recent active task from both regular and pinned results.move_thread_to_sidebar_sectionfor the same local task withsectionId: "pinned"returns success, identifying the requested task and section.navigate_to_codex_pagefor that ID returnsnavigated: true.list_threadsreads still omit the task frompinnedThreadsandthreads; no section'sitemKeyscontains its ID either.The user's sidebar observation is user-reported; the tool responses and subsequent absence from the returned lists are independently observed. A successful navigation receipt does not prove the renderer actually displayed the task. We have not verified a sidebar search result, a restart recovery, or an internal indexing cause.
The saved project path and initial session cwd use a symlink, whereas the native task read reports the resolved canonical directory. This is a possible variable to investigate, not a proven cause. The task later used a separate Git worktree. No application database or rollout records were modified, and no replacement task was created.
This adds a pinning consistency symptom to the readable-by-ID/missing-from-sidebar issue: a pin operation acknowledges success without the subsequent sidebar-state listing reflecting it. Expected behavior is either a visible, persistent pinned entry for a valid accessible task or an explicit actionable failure, rather than a success receipt with no observable result.
A separate Full Access mismatch in this task recovered after the user toggled the permission mode; that report is in #40125. The task-list omission remains observable, so we are not attributing both symptoms to the same cause.
Private paths, project names, task/turn IDs, prompt contents, credentials and complete logs are omitted. One affected task was checked; this is not a frequency estimate.
mingzinanquya commentedon Oct 9, 2026
Additional Windows Codex Desktop reproduction (2026-10-09), with a reversible pin/unpin test:
read_threadand navigation by its canonical thread ID work; the read returns its title, local host, and expected project working directory.list_threads({limit: 50})and the normal sidebar omit it. It is absent from Archived chats as well.pinnedThreadswith the expected metadata. Unpinning hides it again; repinning restores it.Expected: an intact, unarchived project chat remains discoverable in the ordinary task list regardless of pin state. Actual: pinning is required to make this one discoverable. This extends the existing reports because chronological/list grouping did not help. The task itself was not duplicated or deleted, and no local state database was edited.
The desktop build number was not reliably available from the process metadata I checked. Mobile visibility was not verified. Thread IDs, project paths, chat contents, account details, logs, and credentials are omitted.
hyu340929-max commentedon Oct 10, 2026
Possibly related: Windows desktop sidebar entry missing; accessible chat shows incomplete history (2026-10-11)
AI disclosure: Written by OpenAI Codex at the account holder's request. User-reported symptoms, screenshot evidence, and app-tool observations are distinguished below.
User-reported behavior
The user has been using the Windows desktop app throughout. Other conversations remain visible in the sidebar. Of the two observed titles associated with this discussion and its Work continuation, the user cannot find one in the sidebar. The title they can find opens a view that is missing some conversation messages. Asking an assistant in another chat to locate and navigate to the Work record has allowed access to it.
The user confirms that links copied from the two entries/views are identical. A supplied screenshot shows the earlier discussion's title above a reply about the later task. The reported problem is therefore more than confusing titles: the discoverable view also has incomplete history. Identical copied links do not by themselves prove two independent conversations or a link collision.
Environment
Installed Windows
OpenAI.Codexpackage:26.1002.7124.0(Windows package metadata). The Work record is reported askind: "codex",hostId: "durable".App-tool observations
read_threadreturned the Work messages withtitle: nulland an empty preview. Initiallist_threadsincluded this record, using its raw ID as the title and a null summary.navigate_to_codex_pagereturnednavigated: true; the user confirms access through this route.These observations suggest related representations of one conversation. Shared recent messages do not establish that both views expose the same complete history. The incomplete history is user-reported; its precise missing range and cause have not been independently established.
Expected and scope
The conversation and its Work continuation should be easy to locate from the desktop sidebar, with recognizable labeling and access to the complete message history.
This is potentially related evidence, not a confirmed reproduction of this issue's original local-thread/list-omission bug: the app list tool included the durable record. We have not established a clean reproduction, the cause of the title change, or a full comparison of messages shown through each desktop entry. The screenshot does not show the sidebar. Missing messages in a view do not establish that the stored messages were deleted.
Private message text, actual conversation IDs, copied links, and screenshots are omitted from this public draft. Please advise whether this desktop Chat/Work case belongs here or should be tracked separately.