Repository navigation
Description
What version of the Codex App are you using?
Windows package version: 26.1013.3656.0.
Bundled app-server reported version: 0.163.0-alpha.10.2.
What platform is your computer?
Windows 11 Professional, x64, OS build 10.0.22631.
What issue are you seeing?
All six existing local Codex projects disappeared from the desktop sidebar. The app's list_projects tool returned the ChatGPT projects but no local projects. Existing local chats were still discoverable.
The underlying data was present:
- state_5.sqlite contained six rows in projects and seven project_roots rows (one project has two roots).
- Every stored root folder existed.
- PRAGMA quick_check returned ok.
- The desktop global state file contained an empty local-projects object.
- The database had no non-null threads.project_id values at the time of inspection. This was observed, but the earlier assignment state is not established.
- Fully quitting and reopening the app did not restore visibility.
A startup log after restart reported:
[host-app-server-projects] Local app-server project migration completed projectCount=6
What steps can reproduce the bug?
The event that initially emptied the sidebar state is unknown. We cannot confirm that an update or crash caused it.
Observed sequence:
- Open the Windows desktop app and find all established local projects missing.
- Confirm that project/root rows and folders still exist.
- Confirm that local-projects in the desktop global state file is empty.
- Fully quit and reopen the app.
- Observe that startup reports six migrated projects but the local project list remains empty.
What is the expected behavior?
The desktop sidebar should retain existing local projects across restarts. If the sidebar cache is empty while the app-server/database contains valid projects, the app should reconcile the project catalog rather than silently showing no local projects.
Additional information: confirmed recovery
The user confirmed that project visibility returned after this local recovery:
- Fully quit the desktop app.
- Back up .codex-global-state.json.
- Reconstruct the six local-projects cache entries from the existing projects and project_roots database records.
- Recover the original legacy project IDs from project_idempotency_keys and restore app-server-project-id-by-legacy-project-id-by-host for the local host.
- Restore the corresponding project-order entries.
- Reopen the app.
The recovery did not modify the SQLite database or project folders. These cache/mapping/order changes were applied together, so this report does not isolate which individual field was sufficient.
Inspection of the installed build's code suggests the renderer obtains local projects through getLocalProjectsForRenderer() and the desktop project cache, while startup can enumerate server projects without repopulating missing ordinary cache entries. This is a diagnostic hypothesis, not a confirmed upstream root cause.
Related reports: #53251, #48501.
Private project names, absolute user paths, account identifiers, full state files, and conversation contents are intentionally omitted.
Activity
github-actions commentedon Oct 16, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
blackcometclub commentedon Oct 18, 2026
I experienced a very similar incident on an earlier Windows build, although the recovery method was slightly different.
Environment
OpenAI.Codex_26.930.3930.0_x64%USERPROFILE%\.codexThis appears to show that the problem existed in a Windows build older than
26.1013.3656.0.Symptoms
All local projects disappeared from the Codex desktop sidebar. The sidebar showed that there were no projects, while recent chats remained accessible.
Fully quitting and restarting Codex did not restore the projects. Restarting Windows did not help either.
The project directories themselves had not been deleted or moved.
Database inspection
The underlying SQLite database was still intact:
state_5.sqlitecontained 16 rows inprojectsproject_rootsPRAGMA quick_check;returnedokTherefore, this was not a loss of the project directories or the primary project records.
Global-state inspection
The current
.codex-global-state.jsonwas compared with a known-good copy from the previous day.In the broken state:
local-projectsexisted but was emptysidebar-project-thread-ordersexisted but was emptyactive-workspace-rootswas missingelectron-saved-workspace-rootswas missingapp-server-project-id-by-legacy-project-id-by-hostwas missingthread-project-assignmentswas missingthread-project-membership-host-idswas missingproject-orderwas missingThe known-good state contained:
local-projectsentriesThe migration-state object itself was still present in the broken state, but much of the state that the migration depended on was absent or empty.
Recovery used in this case
Unlike the recovery described in this issue, I did not reconstruct the project cache directly from the current database. A known-good
.codex-global-state.jsonfrom the previous day was available, so I selectively restored only the project-related fields from that file.The recovery procedure was:
PRAGMA quick_check.The restored migration checkpoint had:
projectsMigrated = truethreadAssignmentsMigrated = falseAfter restoring these fields together, Codex reopened with the existing database project records intact and all 16 projects visible in the sidebar.
The specific contribution of the migration checkpoint was not isolated.
Important differences from this report
This case restored several related fields together from a known-good backup. It therefore does not establish which individual field was necessary or sufficient to restore the sidebar.
It also does not prove what originally removed those fields.
The incident was discovered immediately after a thunderstorm-related power outage, but the exact failure mechanism remains unknown. An interrupted migration, failed state write, upgrade, or crash is possible, but none of those causes was confirmed.
However, the result is consistent with the hypothesis in this issue:
state_5.sqliteSuggested improvement
It would be safer if the desktop app detected this inconsistency and rebuilt or reconciled the sidebar catalog from valid
projectsandproject_rootsrecords instead of presenting an empty project list.A useful recovery UI could also distinguish between:
That distinction would avoid making an intact project catalog appear permanently deleted.
XiaoTianFan commentedon Oct 20, 2026
Independent confirmed recovery on Windows package
OpenAI.Codex 26.1013.4894.0, observed October 20, 2026. This matches the empty local-project cache described here. All 19 local projects are visible again, and existing chats appear under their projects after restoring the desktop cache and membership state.This adds a case where an up-to-date complete global-state backup was unavailable: project identities came from the intact database, with older saved state and recorded workspace paths used to reconstruct membership.
Before recovery
state_5.sqlite: 19projects, 22project_roots, 1,159 thread records, andPRAGMA quick_checkreturnedok. All recorded project folders existed..codex-global-state.jsonand its.bakboth had"local-projects": {}; the legacy/server project-ID map and several membership/order fields were missing.projectsMigrated: true,threadAssignmentsMigrated: false.threads.project_idvalues were null. This alone does not establish that membership was deleted from SQLite; the earlier database assignment state is unknown.list_projectsreturned cloud projects but zero local projects.Recovery procedure that worked
The following describes this build's internal storage, not a supported cross-version repair API.
Inspect and back up before writing. Read the SQLite schema and catalog in read-only mode, inspect current global-state JSON, and locate any valid historical JSON. We found an older surviving temporary state file containing some assignments and root hints; other temporary files were truncated and unusable. We did not replace the current state wholesale with that old file.
Build a recovery manifest. Recover each original desktop/legacy project ID through
project_idempotency_keys.key -> project_id -> projects.id, and joinproject_rootsfor all roots. In this database there was exactly one idempotency key per project; validate that relationship before treating a key as a legacy ID. Keep existing identities instead of generating new projects. Recover names, roots and ordering from the current database.Recover memberships separately. Prefer saved explicit assignments, preserving intentionally projectless chats. Then reconcile recorded workspace hints and thread working directories against the current project roots. Managed worktrees and moved repositories need explicit handling; a simple parent-directory match can associate a chat with the wrong enclosing project.
Merge only the required fields into the current JSON. The fields restored together in our case were:
For this build,
local-projectsmaps the original legacy ID to{id, name, rootPaths, createdAt, updatedAt}. The server-ID mapping is nested under the existing local host identity (local:plus the resolved Codex home). A local membership entry is{projectKind: "local", projectId: <legacy ID>}, with membership host"local". Do not confuse the legacy project ID with the database project's ID.We preserved unrelated current settings and rejected conflicting newer identities/memberships. The membership migration flag remained false, with recovered thread IDs pending; we did not mark the backend migration complete.
Fully quit the desktop app, then apply from a separate PowerShell window. The script refused to write while this package's
ChatGPT.exewas running. Immediately before applying, it rechecked the catalog/folders and saved fresh copies of both JSON files plus a consistent SQLite snapshot. It staged and validated replacement JSON, atomically replaced each JSON file, and would restore both before-images on an installation failure. The pair is not a single atomic transaction. The recovery script wrote only.codex-global-state.jsonand.codex-global-state.json.bak; it did not write SQLite, project files, or conversation contents.Reopen and verify the live app. A successfully written file is not sufficient evidence of sidebar recovery. Check the app's actual project listing and representative chat memberships, as well as the on-disk cache. To roll back this cache repair, fully quit and restore the two JSON before-images; there is no need to restore SQLite as part of this procedure.
Useful read-only diagnostics for this schema, using a connection opened with
mode=ro:Results and limits
list_projectsnow returns all 19 original local project IDs.threads.project_idvalues were still null and the membership migration remained incomplete. Visibility recovery therefore does not establish that backend migration completed. The recovery script did not edit SQLite; subsequent app activity did change two project positions and one project timestamp.One practical failure along the way: a hidden waiting helper launched from Codex did not survive quitting the app, so the first restart applied nothing. Its exact termination cause was not logged; Windows job membership was observed and is a plausible explanation. Running the repair synchronously in a separately opened PowerShell window succeeded. Do not assume a helper started by the app will remain alive after the app exits.
The useful recovery boundary here is intact database project records and accessible folders, but missing desktop cache/membership state. Please consider startup reconciliation for that inconsistency, preserving original IDs, multiple roots, projectless/archived records, and worktree associations. This is related to #53832's history-visibility symptoms, but does not establish that its direct-link/list-refresh problem has the same cause.
Private project names, user paths, thread IDs, raw state files, and the machine-specific recovery manifest are omitted.
axioAction commentedon Oct 26, 2026
When is this going to be fixed?
zoster81 commentedon Oct 29, 2026
Confirmed recovery on Windows — OpenAI.Codex 26.1023.51421 (October 29–30, 2026)
I encountered the same issue on Windows 11 with OpenAI.Codex 26.1023.51421. After a Windows restart for updates,
config.tomlfailed to parse; the affected file contained 3,905 NUL bytes. Renaming it allowed Codex to start, but all seven local projects were missing from the sidebar. Recent chats remained visible and still showed their project context.I cannot establish whether the update, the damaged TOML file, and the empty project cache had a common cause.
Read-only findings
PRAGMA integrity_checkonstate_5.sqlite:ok(including the current WAL).projects: 7 records;project_roots: 7 records; all roots existed.threads: 27 records; everythreads.project_idwasNULL..jsonl.zstfiles. An initial search for.jsonlalone had incorrectly reported them missing..codex-global-state.jsonhad"local-projects": {}and lacked project ordering and thread assignments.projectsMigrated: true,threadAssignmentsMigrated: false.Recovery performed
project_idempotency_keys), root paths, and unambiguous thread matches..codexwith Robocopy (excluding junctions), verifying the critical JSON/SQLite files and WAL/SHM copies.local-projectsproject-orderapp-server-project-id-by-legacy-project-id-by-hostthread-project-assignments.codex-global-state.jsonand.codex-global-state.json.bak, with rollback on installation failure.The script did not alter SQLite, rollout files, project directories, or migration checkpoints.
Result: after reopening Codex, all seven projects and their corresponding conversations were visible again. The application is functioning normally.
Unlike some earlier reports, this installation recovered with just those four state fields restored together. This does not establish which one was necessary, or prove why the fields were lost.
Reproducibility artifact
Attached:
codex_project_cache_recovery_case.zip, containing the exact Python script used successfully (renamed only) and an explanatory README. The script embeds no machine-specific paths or credentials. It is intentionally case-specific, with safety checks requiring exactly 7 projects, 7 roots, 27 threads, 23 matches, and 4 unmatched threads. It should not be run unchanged on other installations. It is provided as a diagnostic/recovery reference, not a general-purpose repair tool.A startup reconciliation between intact SQLite project records and an empty desktop project cache would prevent this from looking like data loss.
codex_project_cache_recovery_case_7projects.py
codex_project_cache_recovery_case.zip
CaptainVid commentedon Nov 8, 2026
I experienced the same issue on my Windows PC: all local Codex projects disappeared from the sidebar, even though the underlying SQLite database and project directories were still intact.
I managed to recover my projects by reconstructing the local project catalog using the surviving database records, original project identities, and saved project information.
After successfully recovering my own projects, I created an unofficial open-source community utility to help other users diagnose and recover from this specific issue:
GitHub: https://github.com/CaptainVid/codex-local-project-recovery
The utility includes:
Important: This is an independent community workaround, not an official OpenAI solution or a permanent fix for the underlying Codex bug.
The recovery procedure worked on my own installation. However, the packaged release has not yet been independently validated across different Codex versions and Windows configurations.
Please read the documentation carefully and run the preview before applying any changes.
I hope this helps someone else recover their missing projects!
angrybirddd commentedon Nov 10, 2026
I observed the same failure on November 10, 2026, on Windows x64 with Codex desktop package
26.1103.7773.0.After an unexpected shutdown and relaunch, the desktop logged
[global-state] Failed to load global statewith a JSON parse error involving NUL bytes. Seconds later, startup reportedLocal app-server project migration completed projectCount=27. The desktop project list returned zero local projects, whilestate_5.sqlitepassedPRAGMA quick_checkand retained all 27 project records and their original identity mappings. At inspection time, both the current global-state file and its immediate backup parsed successfully and had an emptylocal-projectsregistry. The operation that introduced the NUL bytes is unknown.After backing up the state and fully exiting Codex, I rebuilt only the desktop project registry, order, and desktop-to-server ID mapping from the current database. On relaunch, the desktop returned all 27 projects with their original IDs. The database project records matched the pre-repair snapshot. Some existing chats again appeared under their projects. I could not verify every historical chat assignment.
Could startup preserve the last known-good state and reconcile a missing desktop project registry with the surviving app-server records, retaining the original project IDs and any existing chat assignments?
Hkattelu commentedon Nov 12, 2026
I ran into the same problem on Windows with desktop package
26.1106.6628.0: all six local projects disappeared from the sidebar, and restarting twice did not bring them back. The project folders and six project records were still present,local-projectswas empty, and SQLitequick_checkreturnedok.A case-specific recovery restored project visibility for me: with the app closed and state backed up, a script rebuilt the desktop project catalog, order, and legacy-to-server ID mapping from the existing records. It also reconstructed 53 chat associations from exact working-directory matches, excluding explicitly projectless chats. After reopening, my projects are visible again and the app's project listing returns all six.
The chat matches are inferred from folder paths; I haven't verified every original association. This is a workaround, not a confirmed fix for the underlying bug. I don't know what caused the project registry to become empty or whether it will recur.
pjsinghmk2-sudo commentedon Nov 12, 2026
Confirmed recurrence on Windows 11 x64 (build 26300) with desktop package
26.1103.7773.0and bundledcodex-cli 0.167.0-alpha.3.2. The updater reports no available update.On November 12, 2026, the user restarted Windows and reopened Codex without switching accounts or signing out. Projects showed “No projects” while existing chats were still visible in Recents. This recurred after the same projects and their active chat groupings had been restored on November 6.
The November 12 startup logs show repeated global-state JSON parse failures involving NUL bytes at 03:31:38–03:31:52 UTC. Startup then logged project migration completion with seven database project records at 03:32:05 UTC. At inspection, both the current desktop global-state file and its immediate backup parsed successfully, but each had an empty
local-projectsregistry. The database still contained the original project records and roots, and all four affected folders existed. The app’s project list returned zero local projects.Could the Windows desktop app retain a validated last-known-good copy of global state across restart and reconcile an empty sidebar registry with surviving app-server project records? Please preserve stable project IDs and chat assignments during recovery. The logs establish a startup parse failure, but the operation that introduced the NUL bytes is unknown.
Submitted on the user's behalf. This report omits account details, private paths, screenshots, and chat contents.
xcdhzm commentedon Nov 12, 2026
Additional Windows recovery case — November 12, 2026
This appears relevant to this issue: the desktop project catalog was empty while the database still contained the original projects and roots. The exact app package version was not recorded for this report.
Observed failure sequence
config.tomlparsing error.This is the observed chronology, not evidence that renaming
config.tomlcaused the missing projects. The initial cause of the empty project state is unknown, and I do not have a deterministic reproducer for it.Findings before recovery
PRAGMA quick_checkreturnedok.projects, 6project_roots, and 118threadsrecords.threads.project_idvalue wasNULLat inspection time. The earlier assignment state is unknown, so this alone does not prove that assignments were deleted..codex-global-state.json,local-projectsand the project order were empty.projectsMigrated: trueandthreadAssignmentsMigrated: false. These flags were observed state, not proof that all project and thread migrations had completed successfully.Recovery that succeeded in this case
local-projectscatalog,project-order, and original desktop/legacy-to-server project ID mapping from the surviving database project records, roots, and original ID relationships. Existing project identities were preserved.The recovery script did not modify SQLite or rewrite chat assignments. All five original projects reappeared, and the conversations visible in the post-recovery UI appeared under their projects again. The owner confirmed recovery.
Verification limits
This confirms recovery of the five-project sidebar and the visible conversation groupings. It does not establish that all 118 thread records were individually checked or that every historical project assignment is correct. The catalog, order, and ID mapping were rebuilt together, so this case does not isolate which field was necessary or sufficient, establish the original cause, or prove backend migration completion. This is a case-specific workaround.
Please consider detecting an empty desktop project catalog when valid database projects and roots survive, and reconciling that state while preserving original IDs, multiple roots, and existing conversation assignments.
Private project names, full local paths, personal/account identifiers, raw state files, and private conversation contents are omitted.
Slothswithaids commentedon Nov 12, 2026
Observed the same failure on November 12, 2026 with Windows package
OpenAI.Codexversion26.1103.7773.0and app-server0.167.0-alpha.3.2(Windows x64, OS build10.0.26200).The Projects sidebar shows “No projects.” The app's
list_projectstool returns cloud ChatGPT projects but no local Codex projects. Existing local chats remain discoverable.Read-only checks before recovery:
state_5.sqlitecontains 19 project records and 20 root records. Some are older records with identical root sets; there are 11 distinct root sets, and all stored folders exist.PRAGMA quick_checkreturnsok.project_id. The earlier assignment state is unknown, so this does not establish that assignments were deleted..codex-global-state.jsonand its current.bakboth contain"local-projects": {}.2026-11-12T09:40:16.160Zreports[host-app-server-projects] Local app-server project migration completed projectCount=19.projectsMigrated: true,threadAssignmentsMigrated: false.Inspection of this installed build is consistent with the original report: the renderer reads the desktop project cache, while initialization enumerates the server projects without recreating missing ordinary cache entries. The event that emptied the cache is still unknown; an update, crash, or account switch has not been established as the cause.
A local backup has been saved and cache restoration is being prepared. Recovery has not yet been verified. No project folders or database records have been modified. Private paths, project names, account identifiers, raw state files, and conversation contents are omitted.
venanciotechsolution-dev commentedon Nov 14, 2026
I ran into this several times on Windows. I confirmed the sidebar was empty on November 12 and 14, 2026, on desktop packages
26.1106.6628.0and26.1111.2228.0. The startup logs included JSON parse failures involving NUL bytes, followed byLocal app-server project migration completed projectCount=19. The desktop global state and its immediate backup later had an emptylocal-projectscatalog. Meanwhile, a read-only check ofstate_5.sqlitestill showed 19 projects, 22 folder associations, and 806 existing thread-to-project links (803 active, 3 archived).PRAGMA quick_checkreturnedok.What restored the sidebar in this case
.codex-global-state.jsonand its.bak.project_idempotency_keysto match the server project IDs to the original desktop project IDs.This restored visibility, but the source of the NUL bytes is still unknown. Could the desktop app recover the sidebar from the surviving app-server records when the state files cannot be read or the catalog is empty, while preserving the original project IDs and thread assignments?
lucasheusser commentedon Nov 15, 2026
Additional Windows case — November 15, 2026
Environment: Codex desktop for Windows, installed package
OpenAI.Codex 26.1111.2228.0, Windows x64 build 26300.After an unexpected computer shutdown, 11 established local projects were missing from Projects. Three other local entries remained. The missing projects' folders and older chats were still accessible. Fully quitting and reopening the app did not bring the projects back. Manually reopening one original folder created a visible project entry without its prior conversations. This is the observed sequence. The initial cause has not been reproduced.
Before recovery, a read-only check found the 11 missing project records and all 12 of their project roots in
state_5.sqlite. Every root still existed. The desktop'slocal-projectsregistry contained only the three remaining entries andthread-project-assignmentswas absent. The relevant migration checkpoint reportedprojectsMigrated: trueandthreadAssignmentsMigrated: false.With the app fully closed and its configuration backed up, restoring the missing desktop registry entries and original ID mappings made all 11 affected projects appear in the sidebar. We reused the one project entry that had already been added back. The recovery recorded 354 chat associations using saved assignments and verified working-directory matches, leaving one conflicting case for review. We verified recent chats under the restored projects. The paginated history API still reported some older chats without a project despite the saved assignments, so full history regrouping was not verified. The recovery did not edit SQLite or chat transcripts.
Could startup detect and reconcile a partial desktop project registry against surviving app-server project records, preserving stable IDs, multiple roots, and historical chat associations? A supported recovery path for already affected profiles would also help.
Slothswithaids commentedon Nov 16, 2026
My local projects disappeared again on 16 November 2026 at 17:56 GMT+8, four days after the recovery described in my November 12 comment.
The Projects sidebar was empty again, even though my folders and chats were still there. I’ve now restored the 11 local projects and confirmed they’re visible in the app.
This happened on Windows app package
26.1111.2228.0, with bundled CLI0.169.0-alpha.11.1. The previous incident was on package26.1103.7773.0. The version changed between incidents, but I don’t know what cleared the project list.Closing and reopening the app didn’t fix it. I also reinstalled the Codex dependencies, force-closed the app through Task Manager, and restarted it. The projects were still missing.
Before the repair:
local-projectsin.codex-global-state.jsonwas empty. The project order and legacy-to-server project ID mapping were also missing.state_5.sqlitestill had 19 project records and 20 root records. Several were older entries for the same folders; there were 11 distinct folder sets, and every folder existed.PRAGMA quick_checkreturnedok.list_projectstool returned my cloud projects but none of my local projects.How I got them back
I backed up the state file and SQLite database, fully closed the app, and rebuilt the desktop project cache from the existing
projectsandproject_rootsrecords. For entries pointing to identical folder sets, I used the newest saved record. I recovered the original project IDs fromproject_idempotency_keys, then restored these three settings:local-projectsapp-server-project-id-by-legacy-project-id-by-hostproject-orderAn initial repair attempt stopped without making changes because the app reopened before the write could happen. I then used a helper to close the app, apply the repair while it was stopped, and reopen it. That completed at about 18:06 GMT+8.
After reopening, the app listed all 11 local projects, and sampled existing chats were grouped under their projects again. The restored entries and ID mappings matched the recovery plan. All 682 pre-repair chat IDs were still present; the project, root, and idempotency-key records were unchanged; and the database integrity check still passed. The repair did not edit any project files.
This recovered the sidebar, but it hasn’t fixed whatever keeps clearing it. Please investigate why the desktop cache loses these entries and why the app doesn’t rebuild them from the project records it still has. Having to repeat this recovery four days later makes it difficult to trust the project list.