Repository navigation
Windows Codex Desktop selectively loses historical local sessions while older legacy threads survive, alongside incomplete project-assignment migration #41874
Description
What version of the Codex App are you using (From “About Codex” dialog)?
26.825.6671
What subscription do you have?
ChatGPT Plus
What platform is your computer?
Windows 11 Home 25H2, build 26200.9168, AMD64 (64-bit)
What issue are you seeing?
Codex Desktop on Windows shows two distinct local-history failures:
-
Incomplete project-assignment migration. Existing threads survived on disk but lost their Project association. The persisted migration state was
projectsMigrated = truewhilethreadAssignmentsMigrated = false. Before a backed-up repair, 0 of 11 uniquely attributable Project-to-thread assignments were present inthreads.project_id; the legacy JSON assignment map held 9 of 11, while sidebar ordering retained all 11. -
Selective session/rollout loss. I remember additional primary conversations in the “3D打印产品报价系统” Project from approximately one to two months earlier. Those conversations are absent from every local store and VSS snapshot examined, although still older May 2026 legacy threads remain intact and usable.
The user-visible symptom was that Projects still existed, but some historical conversations disappeared. Some surviving conversations could be reassociated with their Projects, but the remembered missing primary conversations cannot currently be recovered because their thread rows and rollout files are absent from every available local dataset and snapshot.
This is not a claim that all history disappeared, and I cannot identify a specific Codex, ChatGPT, or Windows update as the cause.
What steps can reproduce the bug?
I do not currently have a deterministic reproduction because the loss appears to have occurred during an earlier in-place app/project migration.
Observed sequence:
- Use Codex Desktop on Windows over multiple months with several local Projects and local conversation history.
- Update Windows, Codex Desktop, and ChatGPT Desktop in place over time. I did not uninstall/reinstall Codex or ChatGPT and did not reinstall Windows.
- After later app/project migrations, some Projects still exist but part of their historical conversation list is missing.
- Inspecting local Codex state showed
projectsMigrated=truewhilethreadAssignmentsMigrated=false. - Surviving threads could be reassigned because their SQLite rows and rollout files still existed.
- Other remembered primary conversations could not be found in:
state_5.sqlitesessions/rollout-*.jsonlsession_index.jsonlthread_history_1.sqlite- the pre-repair backup
- two Windows VSS snapshots
Important control case:
A May 21, 2026 legacy primary thread still exists and works normally in the UI, even though it is older than the missing conversations. Its rollout is intact and hash-identical across live data and VSS snapshots.
Stable pre-investigation baseline:
- 4 Projects
- 44 threads
- 44 rollout/session files
- 18 primary user threads
- 26 child/helper threads
Two additional guardian/review threads were generated only during the forensic investigation and are not recovered history.
What is the expected behavior?
- App updates and Project migrations should preserve all existing primary local sessions and rollout files.
- Migrated Projects should retain their thread assignments, or provide a supported reconciliation/recovery path.
- Threads that cannot be assigned to a Project should remain available as Projectless rather than disappearing.
- Older local conversations should not selectively disappear while even older legacy conversations remain intact.
Additional information
Key forensic findings:
- A May 21, 2026 legacy Project thread remains fully usable.
- Its rollout is 37,462,645 bytes / 756 records and is hash-identical in live data, VSS7, and VSS8.
- It is absent from both
session_index.jsonlandthread_history_1.sqlite, showing those indexes are not required for historical survival. - A July 28 quotation-system thread also survives and underwent the same legacy Project ID -> app-server Project ID remapping.
- Project-assignment migration was incomplete, but this only explains surviving threads losing Project membership; it cannot explain remembered sessions whose SQLite rows and rollout files are entirely absent.
- VSS snapshots from Aug 30 and Aug 31 contained no additional thread/session IDs outside the live set.
logs_2.sqlitecontained additional internal thread IDs, but forensic classification identified no missing primary-user conversation among them.
Related but not identical: #26157, #41867, and #41864.
#26157 appears to cover the project/sidebar mapping failure where the underlying local sessions still exist. My case additionally includes remembered primary conversations for which neither the thread rows nor rollout/session files are present in the live store or available VSS snapshots.
02_TECHNICAL_TIMELINE.md
03_DATASET_SUMMARY.md
05_PROJECT_MIGRATION_SUMMARY.md
06_VSS_FORENSICS.md
07_PRIVACY_REDACTION_REPORT.md
I have a redacted diagnostic package containing a technical timeline, dataset comparison, Project-migration analysis, and VSS forensic results. Raw SQLite databases, rollout files, prompts, source code, credentials, and account identifiers are not included.
Activity
github-actions commentedon Aug 31, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
mattLummus commentedon Aug 31, 2026
Also happening on macOS
84dnnvbdvp-debug commentedon Aug 31, 2026
I dug into the current public Project source because this report usefully keeps assignment loss separate from the physically missing-session branch. One concrete retry edge may matter for the first half:
project/importassigns supplied existing threads when the Project is first created.StateRuntime::create_projectchecksproject_idempotency_keysbefore validating or applyingthread_ids. A same-key replay returns the existing Project withcreated=false.thread/project/updatedfor an import only whencreatedis true. Itsproject_import_is_atomic_and_notifies_after_commit_in_ordertest explicitly expects a same-key replay to produce no Project or thread-assignment notifications.So if Desktop has already persisted canonical Project creation but its legacy thread-assignment phase is incomplete, replaying the same
project/importis not an assignment reconciliation mechanism. The existing thread metadata assignment path can reconcile surviving threads independently.A focused migration regression could seed a Project under its migration idempotency key, leave known surviving legacy threads with
project_id = NULL, restart with Project creation already complete / assignment migration incomplete, reconcile and verify those assignments, and only then mark the assignment phase complete. Missing legacy thread IDs should remain explicit unresolved/projectless cases rather than becoming grounds to hide or delete surviving conversations.This is a source-grounded survivable partial-state path, not a claim that it caused the state reported here. It also does not explain the separate conversations whose rows and rollout files are physically absent.
agerritzen commentedon Sep 1, 2026
Additional Windows 10 data point that may help isolate this to Codex Desktop rather than the underlying sessions/account.
Environment:
Key control case: the Codex VS Code extension on the same machine/account can still see the latest Codex session correctly and can access/resume the expected local history. Codex Desktop cannot. This seems useful because it suggests the underlying sessions/account are intact and the remaining failure is Desktop-specific project/sidebar/reconciliation behavior.
Forensics before recovery:
state_5.sqlite: 9 rows inprojects, 9 matchingproject_rootsthreads: 139 rows totalproject_id = NULLprojectsMigrated = truewhile host-specificthreadAssignmentsMigrated = falseAfter reconstructing only unambiguous surviving assignments from CWD -> existing
project_roots:project_idvaluesNo projectsRecent, even though it is present in SQLite/session files and visible in the VS Code extensionThere is also a second Desktop catalog at
.codex/sqlite/codex-dev.db:local_thread_catalog: 488 rows totallocalhost: 107 distinct rows, initially 107/107 withproject_id = NULLlocal_thread_cataloglook derived/reconciled rather than authoritativeMost useful differentiator: VS Code Codex extension works with the same account/local data while Codex Desktop 26.825.6671 shows an empty Projects section and omits the latest local session.
This may be worth testing as a migration/restart regression where canonical
projects/project_rootssurvive, thread assignment migration is incomplete, and Desktop's local catalog/sidebar reconciliation fails to repopulate even after canonicalthreads.project_idis valid. The VS Code extension behavior provides a useful control that the local session itself is still recoverable.agerritzen commentedon Sep 2, 2026
Follow-up from the same Windows 10 / ChatGPT Plus machine after deeper read-only inspection of the installed Codex Desktop renderer/main-process code and current runtime state.
The empty Projects sidebar is now isolated to a second Desktop-specific failure above the migration/database layer.
Environment now:
Important correction to my earlier hypothesis: Desktop does not think this account is Free. The current auth/account-info path resolves
chatgpt_plan_typeasplus, and the renderer receivesplan = "plus"correctly.Installed-code/runtime tracing shows the Projects page ultimately derives
showLocalProjectsfrom a policy path that can switch between ordinary local access andworkLocalvia feature gate1463309241.Observed/effective path on the affected Desktop session:
This is distinct from the earlier migration damage. The local data has been independently verified as still present:
state_5.sqlitecontains 9 projects + rootsNo projectsThe legacy/app-server project mapping mechanism is also explicit in the installed app code (
app-server-project-id-by-legacy-project-id-by-host), so the earlier missing mapping was a real migration defect, but fixing that mapping alone does not restore the sidebar because the entitlement/feature-gate path still setsshowLocalProjects=false.Why the VS Code control case matters even more now:
workLocal/workspace-admin gating path to the Projects UIThis suggests there are two independent regressions in this case:
workLocalworkspace-admin entitlement for a personal Plus account, hiding otherwise valid local projects.No auth tokens, account IDs, private prompts, project source, or raw databases are included here. No entitlement bypass or app patch was applied.
A useful regression test would be: personal ChatGPT Plus account + local projects + gate
1463309241enabled, then verify that Projects visibility does not depend on an Enterprise/managed-workspaceadminWorkLocalEnabledvalue. The VS Code extension behavior is a useful comparison because it does not exhibit the same failure on this account.FawziLinggo commentedon Sep 3, 2026
I can independently reproduce the same failure pattern on Windows with a personal ChatGPT Plus account, and I was able to isolate it above the canonical project/database layer.
Environment
26.901.208580.153.0-alpha.5CODEX_HOMEon a secondary driveUser-visible symptom
The Desktop sidebar renders:
while Recent threads are still visible.
Canonical data is intact
After repairing the incomplete thread assignment migration, read-only diagnostics show:
So the project definitions, roots, and most thread assignments are present and internally consistent.
Decisive app-server control
I then queried the bundled Codex app-server directly using the official
project/listAPI.With both
CODEX_HOMEandCODEX_SQLITE_HOMEexplicitly pointed at the active Codex home:All 8 projects and their roots are returned correctly.
I repeated the same probe using the normal inherited environment (
CODEX_HOMEset, no explicitCODEX_SQLITE_HOMEoverride):Again, all 8 projects are returned.
This rules out, for this reproduction:
projectsrows;project_roots;project/listpath;The effective pipeline is therefore:
Desktop catalog is also populated
The Desktop catalog is not empty either:
So this is not the earlier
initial_build_complete=0catalog failure mode.Why this seems useful for this issue
This reproduction is very close to the later Windows report in this thread where canonical project data and
threads.project_idwere repaired successfully but Desktop still renderedNo projects.I have not patched the Desktop bundle or bypassed any policy/feature gate, so I cannot independently claim that feature gate
1463309241/workLocal/adminWorkLocalEnabledis the cause on my build. However, the directproject/listcontrol above strongly isolates my remaining failure to the Desktop layer after the app-server has already returned the full valid project set.It may be useful to add a regression test for:
The important point from my reproduction is that project recovery at the SQLite/global-state level is not sufficient: the backend can be fully healthy and return all projects while the Windows Desktop UI still displays an empty Projects section.
I can provide additional sanitized output if maintainers want a specific field or app-server request/response shape. No raw DBs, project names, paths, prompts, or credentials are included here.
agerritzen commentedon Sep 5, 2026
Additional diagnostic linkage for my Windows 10 / ChatGPT Plus reproduction:
Codex in-app Feedback ID:
no-active-thread-01a07104-4016-78b1-a83a-8f91506cf2d9I submitted this through the Codex Desktop feedback function after reproducing the same
Projects -> No projectsstate described in my comments above.The feedback corresponds to the affected Desktop state where:
This Feedback ID should allow the Codex team to correlate the public GitHub report with the private diagnostic/performance trace collected by the app.
3nines commentedon Sep 7, 2026
I can confirm the same incomplete project-assignment migration on the current Codex Desktop app.
Codex app version:
26.901.51231User-visible symptoms:
I performed a read-only comparison of the current Codex state with a local state backup from before the regression.
The older state still contains:
local-projectsthread-project-assignmentselectron-saved-workspace-rootsIn the current state, the same surviving threads have
thread-workspace-state-v1entries and their workspace/CWD information is still present, but theirprojectvalue isnull.Most importantly, both the older backup and current state report:
This appears consistent with a partial migration where workspace/thread data survives, but the historical thread-to-Project assignments are not reconciled into the new Project model.
I have intentionally omitted all Project names, repository names, local paths, thread IDs, Project IDs, account identifiers, source code, prompts, and raw Codex state/database files for privacy.
I can provide additional redacted structural information if useful for debugging.
calltosveta-afk commentedon Sep 13, 2026
Adding a macOS reproduction of the same incomplete project-assignment migration class.
Environment
26.908.4083426.6.2, Apple SiliconReproduction and readback
list_threads/ the project sidebar.Redacted migration state after restart
projectsMigrated=truethreadAssignmentsMigrated=falsependingThreadAssignmentIds: 8Expected
Readable tasks assigned to the saved project should appear in
list_threadsand the project sidebar after migration/restart.Safety / data integrity
.codex-global-state.json, SQLite, or internal indexes.This looks like a desktop projection/assignment migration defect rather than missing task data, because exact-ID reads continue to work while list/sidebar projection and the migration completion flag remain stale. Is there a supported way to retry or repair the assignment backfill on macOS?