Codex history disappears and it will not work - Codex
Quick fix
Upgrade to cc-switch v3.16.4 to fix zstd decode failures and CODEX_SQLITE_HOME state database probing that lose or desync sessions.
Symptom
Section titled “Symptom”升级到 3.16.3 后:
- 无法创建管理员沙箱
- 无法创建非管理员沙箱
- 无法新建项目
- Codex 历史记录消失After upgrading to 3.16.3: - Cannot create an administrator sandbox - Cannot create a non-administrator sandbox - Cannot create a new project - Codex history disappeared
cc-switch v3.16.3 has two main problems. First, the Codex desktop or store build sends a zstd-compressed request body that the older local proxy cannot decode, so Codex behind the proxy cannot create a sandbox or a new project. Second, with the "unified Codex session history" feature in use, the system relocates the SQLite state database through the CODEX_SQLITE_HOME environment variable, but the v3.16.3 migration scanner cannot detect a relocated state database — so history appears to "disappear" (it is really filed under another provider drawer) or sessions from the official and API builds fail to sync. Both were fixed in v3.16.4.
Upgrade cc-switch to v3.16.4 or newer for gzip/br/deflate/zstd decompression support and the fixed state database probing logic.
Turn the "unified Codex session history" feature back on. Because it is forward-only by default, be sure to tick "migrate existing official sessions" in the dialog when turning it on, so old sessions are migrated into the shared bucket correctly.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 2 real issues
- With "unified Codex session history" on, why are the sessions of the official and API Codex still separate?
- The feature is forward-only by default: once on, only newly created sessions go into the shared bucket. Existing history is not merged automatically — you have to tick "migrate existing official sessions" in the dialog when turning it on, and it is not a real-time two-way sync.
- Was the Codex history really deleted after upgrading to 3.16.3?
- The records were not deleted. A defect in the history migration bucketing that probes the CODEX_SQLITE_HOME state database filed them wrongly under another provider drawer. Upgrading to v3.16.4 fixes the probing and recovers them.
Related problems
Section titled “Related problems”This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.