You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
All my projects and conversations are missing after Computer restart #19615
What version of the Codex App are you using (From “About Codex” dialog)?
26.422.30944
What subscription do you have?
Pro
What platform is your computer?
Windows 11 Home
What issue are you seeing?
My Computer had to restart and when it loaded back up I started Codex back up and when I did all of my projects and chats in codex are gone. If I search for them, they do show up, but I can't see them on the main interface. New chats won't appear either.
So no matter what I do I can't see new chats or projects or conversations.
I was able to recover from this locally and wanted to add the concrete workaround/root cause I found.
BTW, Codex with 5.5 on extra high FIXED THIS PROBLEM. So it literally fixed itself lol
This did not appear to be data loss. The threads still existed in the local Codex database (%USERPROFILE%\.codex\state_5.sqlite) and session files. The missing sidebar/projects were caused by the desktop app's global UI/project state being rewritten without saved workspace roots.
On the affected Windows machine, %USERPROFILE%\.codex\.codex-global-state.json had been reduced to only the current projectless thread state, for example it was missing keys like:
electron-saved-workspace-roots
active-workspace-roots
most entries under thread-workspace-root-hints
Older temp global-state files under %USERPROFILE%\.codex\ still contained the prior workspace root, and state_5.sqlite still contained the older thread rows. Restoring those keys brought the sidebar/projects back.
Important detail: editing .codex-global-state.json while Codex Desktop was still running did not stick. The running app had the empty sidebar/project state in memory and overwrote the restored file again on shutdown/relaunch.
The recovery that worked was:
Back up %USERPROFILE%\.codex\.codex-global-state.json and %USERPROFILE%\.codex\state_5.sqlite.
Fully quit Codex Desktop, including all background Codex.exe / codex.exe processes. Closing the window was not enough in this case.
While Codex was fully stopped, restore the missing global state keys:
electron-saved-workspace-roots: array of the local workspace root(s)
active-workspace-roots: same workspace root(s)
thread-workspace-root-hints: map existing thread IDs from state_5.sqlite back to their workspace roots
Relaunch Codex Desktop.
After doing the restore post-exit, the projects and conversations reappeared in the left sidebar.
Suggested product-side fixes:
Treat missing/empty electron-saved-workspace-roots / active-workspace-roots as recoverable if state_5.sqlite still has local threads with cwd values.
On startup, rebuild workspace roots and thread-workspace-root-hints from the local thread DB/session index when the global state file is missing, truncated, or inconsistent.
Avoid overwriting a repaired .codex-global-state.json from stale in-memory empty state during shutdown.
Consider preserving the last known good global-state file before writing a reset/empty one.
This looks like a sidebar/project index corruption issue, not deletion of conversations.
This happened to me and I realized what happened. Very simple fix in my case. I had defined CODE_HOME in the environment variables to point to a new folder, but unknown to me the change wasn't picked up right away. I may or may not have opened Codex one before making the change, but I had not restarted my computer. So Codex saved all of its data into the default location, then switched to the one I had set after my computer restarted.
After I deleted CODEX_HOME and rebooted again, all of my chats/data was back.
I am experiencing the same or a closely related issue on Codex Desktop for Windows.
During the last week of July 2026, multiple previously visible and pinned Codex projects and their project history suddenly disappeared from the interface.
I did not intentionally delete, archive, unpin, or move these projects to another account or workspace.
The missing projects contained ongoing development work, project instructions, implementation history, technical decisions, previous task context, and completed Codex work. Their disappearance forced me to reconstruct project context and repeat previously completed Codex tasks.
I submitted diagnostic feedback through the Codex Desktop app.
Feedback ID:
019fb27c-bcc3-7243-970b-7655ccad1da4
Please associate the diagnostic data attached to this Feedback ID with this issue and investigate:
Whether any user-initiated deletion, archive, unpin, or workspace transfer event exists.
Whether the missing projects and sessions still exist in local or server-side records.
Whether the project/sidebar index or project-to-session associations can be restored.
Whether this issue resulted from synchronization, indexing, migration, or a Windows desktop client problem.
Whether similar incidents occurred during the same period.
The disappearance caused me to repeat previously completed work and consume additional Codex usage, credits, tokens, and plan limits. I will submit the account-specific usage compensation request privately through OpenAI Support.
I am not posting my account email, private project names, repository details, or other confidential account information publicly.
After restart, all 8 projects returned both in the left sidebar and in the project selector for a new task. Existing project conversations remained attached.
Important: this is schema-sensitive and should not be applied blindly. Use a known-good backup, validate with PRAGMA integrity_check, preserve IDs, and verify counts before replacing the global-state file. If no backup exists, project roots can potentially be reconstructed from distinct threads.cwd values, but project IDs and legacy/app-server mappings must still be generated consistently.
This suggests Desktop needs an official startup repair path that detects threads > 0 together with an empty/incomplete project registry and rebuilds projects/associations from durable thread cwd data instead of presenting apparent data loss.
~/.codex/.codex-global-state.json, key "local-projects" -> reset to {}
Only the JSON key was cleared, but that's what the UI reads, so the sidebar
went empty even though the DB was fine.
The serious part: in the same write, .codex-global-state.json.bak was
overwritten with the already-empty state. So the app destroyed its own
backup. The only surviving copy was a stale
"..codex-global-state.json.tmp--" leftover from a previous
write. Without that orphaned temp file this would have been unrecoverable.
Suggested fixes:
Don't refresh .bak from a state that just lost a populated key —
validate before overwriting the backup.
Have the UI fall back to the sqlite projects table when local-projects
is empty, since the data is right there.
Recovery I used:
Restored the "local-projects" object from the newest non-empty .tmp-
snapshot back into .codex-global-state.json (app closed). Safe against
duplicates because project_idempotency_keys already maps each legacy JSON
project id to its sqlite project id, so reconciliation matches instead of
re-creating.
Related, possibly same migration: app-server-projects-migration-by-host
shows "threadAssignmentsMigrated": false, and threads.project_id is NULL
for all 715 threads. Projects came back empty because chat->project
assignments never migrated.
Activity
github-actions commentedon Apr 26, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Deadlywolf712 commentedon Apr 26, 2026
I'm getting this problem too, its extremely frustrating.
novaflash82 commentedon Apr 26, 2026
I was able to recover from this locally and wanted to add the concrete workaround/root cause I found.
BTW, Codex with 5.5 on extra high FIXED THIS PROBLEM. So it literally fixed itself lol
This did not appear to be data loss. The threads still existed in the local Codex database (
%USERPROFILE%\.codex\state_5.sqlite) and session files. The missing sidebar/projects were caused by the desktop app's global UI/project state being rewritten without saved workspace roots.On the affected Windows machine,
%USERPROFILE%\.codex\.codex-global-state.jsonhad been reduced to only the current projectless thread state, for example it was missing keys like:electron-saved-workspace-rootsactive-workspace-rootsthread-workspace-root-hintsOlder temp global-state files under
%USERPROFILE%\.codex\still contained the prior workspace root, andstate_5.sqlitestill contained the older thread rows. Restoring those keys brought the sidebar/projects back.Important detail: editing
.codex-global-state.jsonwhile Codex Desktop was still running did not stick. The running app had the empty sidebar/project state in memory and overwrote the restored file again on shutdown/relaunch.The recovery that worked was:
%USERPROFILE%\.codex\.codex-global-state.jsonand%USERPROFILE%\.codex\state_5.sqlite.Codex.exe/codex.exeprocesses. Closing the window was not enough in this case.electron-saved-workspace-roots: array of the local workspace root(s)active-workspace-roots: same workspace root(s)thread-workspace-root-hints: map existing thread IDs fromstate_5.sqliteback to their workspace rootsAfter doing the restore post-exit, the projects and conversations reappeared in the left sidebar.
Suggested product-side fixes:
electron-saved-workspace-roots/active-workspace-rootsas recoverable ifstate_5.sqlitestill has local threads withcwdvalues.thread-workspace-root-hintsfrom the local thread DB/session index when the global state file is missing, truncated, or inconsistent..codex-global-state.jsonfrom stale in-memory empty state during shutdown.This looks like a sidebar/project index corruption issue, not deletion of conversations.
osvince commentedon Jun 8, 2026
This happened to me and I realized what happened. Very simple fix in my case. I had defined CODE_HOME in the environment variables to point to a new folder, but unknown to me the change wasn't picked up right away. I may or may not have opened Codex one before making the change, but I had not restarted my computer. So Codex saved all of its data into the default location, then switched to the one I had set after my computer restarted.
After I deleted CODEX_HOME and rebooted again, all of my chats/data was back.
john23m6 commentedon Aug 5, 2026
I am experiencing the same or a closely related issue on Codex Desktop for Windows.
During the last week of July 2026, multiple previously visible and pinned Codex projects and their project history suddenly disappeared from the interface.
I did not intentionally delete, archive, unpin, or move these projects to another account or workspace.
The missing projects contained ongoing development work, project instructions, implementation history, technical decisions, previous task context, and completed Codex work. Their disappearance forced me to reconstruct project context and repeat previously completed Codex tasks.
I submitted diagnostic feedback through the Codex Desktop app.
Feedback ID:
019fb27c-bcc3-7243-970b-7655ccad1da4
Please associate the diagnostic data attached to this Feedback ID with this issue and investigate:
The disappearance caused me to repeat previously completed work and consume additional Codex usage, credits, tokens, and plan limits. I will submit the account-specific usage compensation request privately through OpenAI Support.
I am not posting my account email, private project names, repository details, or other confidential account information publicly.
ilyafefelov commentedon Sep 2, 2026
Confirmed another Windows variant and recovered it durably on Codex Desktop
26.831.2377.0.This was not conversation data loss. The local DB still contained 186 thread rows, but the project registry had been wiped:
state_5.sqlite:projects=0,project_roots=0,project_idempotency_keys=0.codex-global-state.json: only one surviving entry underlocal-projects/project-orderRestarting, signing out/in, and clearing app caches did not help because the persistent project registry itself was incomplete.
The recovery that worked was:
%USERPROFILE%\.codex\state_5.sqlite(including WAL/SHM if present) and.codex-global-state.json.projects,project_roots, andproject_idempotency_keysinto the currentstate_5.sqlitein one transaction.threads.project_idby normalized longest-prefix matching ofthreads.cwdtoproject_roots.path.local-projectsproject-orderapp-server-project-id-by-legacy-project-id-by-hostapp-server-projects-migration-by-hostthread-project-assignmentsAfter restart, all 8 projects returned both in the left sidebar and in the project selector for a new task. Existing project conversations remained attached.
Important: this is schema-sensitive and should not be applied blindly. Use a known-good backup, validate with
PRAGMA integrity_check, preserve IDs, and verify counts before replacing the global-state file. If no backup exists, project roots can potentially be reconstructed from distinctthreads.cwdvalues, but project IDs and legacy/app-server mappings must still be generated consistently.This suggests Desktop needs an official startup repair path that detects
threads > 0together with an empty/incomplete project registry and rebuilds projects/associations from durable threadcwddata instead of presenting apparent data loss.Zoinen commentedon Sep 7, 2026
was getting this a few times in the past, and today again, it's not fixed
Zoinen commentedon Sep 7, 2026
thanks Claude Code, it fixed my Codex:
Desktop app wiped local-projects and overwrote its own backup with the empty state
Platform: Windows 11, Codex desktop (MSIX: OpenAI.Codex_2p2nqsd0c76g0)
What happened:
All 5 of my projects disappeared from the sidebar. Chats were unaffected.
Root cause (from disk inspection):
Projects are stored in two places:
Only the JSON key was cleared, but that's what the UI reads, so the sidebar
went empty even though the DB was fine.
The serious part: in the same write, .codex-global-state.json.bak was
overwritten with the already-empty state. So the app destroyed its own
backup. The only surviving copy was a stale
"..codex-global-state.json.tmp--" leftover from a previous
write. Without that orphaned temp file this would have been unrecoverable.
Suggested fixes:
validate before overwriting the backup.
is empty, since the data is right there.
Recovery I used:
Restored the "local-projects" object from the newest non-empty .tmp-
snapshot back into .codex-global-state.json (app closed). Safe against
duplicates because project_idempotency_keys already maps each legacy JSON
project id to its sqlite project id, so reconciliation matches instead of
re-creating.
Related, possibly same migration: app-server-projects-migration-by-host
shows "threadAssignmentsMigrated": false, and threads.project_id is NULL
for all 715 threads. Projects came back empty because chat->project
assignments never migrated.