Repository navigation
Description
Subject: Formal complaint —
Date: 27 October 2026
Timezone: Australia/Sydney (AEDT)
Product: Codex desktop for Windows
Desktop version recorded in logs: 26.1021.31345
Windows package version: 26.1021.3705.0
Subscription: Pro
On opening Codex, I received this error:
“ChatGPT configuration could not be loaded”
C:\Users[username].codex\config.toml:1:7635:
key with no value, expected '='
I deleted config.toml to get the application running. Afterwards, all my local projects disappeared from the Projects tree.
The latest original configuration backup found during recovery was config.toml.vexp-bak, dated 4 October 2026. No newer original configuration backup was found in the locations searched.
The recovery investigation found that 20 original project records still existed in state_5.sqlite, while the separate “local-projects” list in .codex-global-state.json was empty. The desktop startup log reported loading the project records, but the sidebar remained empty.
During troubleshooting, the assistant made several unsuccessful changes and repeatedly asked me to restart Codex. It presented unverified explanations with excessive certainty. These attempts included changing migration flags, modifying chat-to-project assignments and the desktop catalog, and creating a temporary recovery project.
The successful recovery was performed with Codex fully closed. A launcher:
- Backed up the current global state and databases.
- Restored the 20 saved sidebar project entries from an older global-state snapshot.
- Matched those entries to existing database project IDs and restored associated sidebar metadata.
- Removed the temporary recovery project and corrected unintended remote-host catalog assignments from an earlier attempt.
- Verified the restored records before I reopened Codex.
I confirmed that the projects returned after this recovery.
Exact recovery launcher:
C:\Users[username]\Documents\Codex\2026-10-27\whe\outputs\Restore-Codex-Projects.cmd
Supporting recovery scripts, in the same folder:
Restore-Codex-Projects.ps1
restore_codex_projects.py
Recovery verification report:
C:\Users[username]Documents\Codex\2026-10-27\whe\outputs\recovery-result.json
Backup created by the successful recovery:
C:\Users[username].codex\sidebar-recovery-backup-20261027-094028
Snapshot used to restore the sidebar:
C:\Users[username].codex..codex-global-state.json.tmp-1790803971401-75c7a68f-5a34-498b-bfbf-02cebbdca74f
Affected sidebar state:
C:\Users[username].codex.codex-global-state.json
Recovery chat ID:
01a17a49-e475-7023-8a44-38061dc60052
Please investigate the original configuration failure, why existing database projects were not restored to the sidebar, and the quality of the assistant’s recovery guidance. The cause of the original configuration corruption was not established.
Please provide a complaint reference number, an engineering review, and guidance on preventing recurrence.
Activity
github-actions commentedon Oct 26, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Kaveendra commentedon Oct 26, 2026
This is the recover script which solved my issues.
Restore-Codex-Projects.zip
charleswanghc commentedon Nov 18, 2026
Additional independent report (November 18, 2026, Asia/Taipei) from an affected Windows Codex Desktop user. Reporting on the user's explicit request; no personal projects, account details, or conversation contents are included.
Observed sequence
config.tomltoconfig.toml.bak(did not delete the backup).Not yet verified
state_5.sqlite, session transcripts, or.codex-global-state.json; therefore this is a reported UI/project-association loss, not a confirmed deletion of chats or source files.Expected behavior / request
A malformed
config.tomlor unexpected system shutdown should never cause Codex Desktop to silently lose its local project registry, pinned/recent project organization, or chat-to-project associations. Please provide an in-app, supported recovery/reindex mechanism to reconcile existing SQLite project records and surviving session rollouts against an empty/corrupted desktop registry, preserving original project IDs, grouping, and last-known-good metadata. Also investigate crash-safe writes and backup/validation for both the config and global project state.Related recovery analysis: #54538 (projects in SQLite survive while the sidebar cache is empty), #60541 (unclean restart and global-state corruption).
charleswanghc commentedon Nov 18, 2026
Follow-up diagnostic evidence from the same affected Windows user (November 18, 2026, UTC+08:00). The user ran read-only PowerShell inventory commands, with the following confirmed file metadata:
.codex-global-state.json: 99,714 bytes, modified 2026-11-18 11:24:27 local time..codex-global-state.json.bak: same size and timestamp as primary.Get-Content -Raw | ConvertFrom-Jsonfailed on both files. The exception details / independent JSON parser results have not yet been captured, so the precise corruption mode is unverified.state_5.sqliteexists and is 17,391,616 bytes (2026-11-18 11:01:21).session_index.jsonlexists and is 69,748 bytes (2026-11-17 14:45:49).sessionsandarchived_sessionsdirectories exist; their contents have not yet been enumerated...codex-global-state.json*.tmp-*files survive; among nonempty candidates, one main-state snapshot from 2026-10-18 is 451,678 bytes, plus backups from earlier dates. Their JSON validity and project registry content are pending inspection.This strengthens the case that an unclean reboot can leave both current global-state files unparseable while an existing SQLite database and older snapshots survive. It does not establish deletion of project rows or chat transcripts. We are doing read-only snapshot validation before any restore, to avoid overwriting original IDs or newer sessions. Please prioritize a safe built-in recovery/reindex workflow and preservation of distinct last-known-good state snapshots.
charleswanghc commentedon Nov 18, 2026
Further diagnostic follow-up from the same affected Windows user (2026-11-18, UTC+08): a local Python read-only inventory has now verified the current global-state JSONs are syntactically valid, not malformed: both primary and .bak have
local-projects = {}(0 entries). The earlier PowerShellConvertFrom-Jsonerrors were not reliable proof of damaged JSON.Other verified facts: SQLite
PRAGMA quick_check = ok,projects = 44,project_roots = 47,threads = 767; all SQLitethreads.project_idvalues are NULL. Thesessionsdirectory contains 772 files andarchived_sessions2 files (contents not yet verified). Among valid global-state snapshots, 2026-10-18 retained 18 legacy project registrations, 2026-10-02 and 2026-09-24 each retained 11 (a subset of those 18), and 2026-09-03 retained 11 different legacy project IDs. Across valid historical snapshots there are 29 distinct legacy project registration IDs, including IDs from projects the user repeatedly manually re-added after earlier sidebar losses. An existing SQLite database may therefore contain multiple generations of the same working-directory roots and project IDs.Recovery needs to reconcile the historical registration IDs and chat grouping with the 44 newer database rows, rather than blindly restoring one prior full global-state file. Please consider a built-in version-aware project registry restoration/reconciliation and crash-safe history. No private paths, project names, or thread contents are shared here.
charleswanghc commentedon Nov 18, 2026
Further read-only reconciliation results for the same Windows user's November 18 incident (no personal project names, paths, or thread IDs included):
quick_check=ok, 44 project rows, 47 project_root rows, 767 thread rows, and 0 non-NULL thread.project_id rows.We are preparing a case-specific two-stage preview/restore process which preserves the current global-state owner atoms, original legacy identity mapping, and all SQLite/session files; it explicitly flags non-identical-root conflicts rather than silently merging them. Request to upstream: support first-party reconciliation of duplicate historical project registrations, existing idempotency-key relationships, missing sidebar cache, and chat associations after interrupted restarts.
No definitive root cause or complete UI restoration is claimed yet.