Codex Desktop corrupts local history on Windows: project sessions disappear and UTF-8 Chinese history becomes mojibake

Open 💬 1 comment Opened May 17, 2026 by addincaoy1981

Codex Desktop history corruption / project conversations disappear on Windows

Summary

Codex Desktop on Windows corrupted or failed to render local conversation history after an app update. Multiple historical conversations either disappeared from project-scoped history or opened as mojibake/garbled text. Some conversations also fail with the Desktop error page:

糟糕,出错了
检查更新
重试

Clicking retry opens a new conversation window instead of reliably loading the old thread.

Environment

  • OS: Windows
  • Codex Desktop app path observed:

C:\Program Files\WindowsApps\OpenAI.Codex_26.513.3673.0_x64__2p2nqsd0c76g0\app\Codex.exe

  • Codex Desktop version observed from install path: 26.513.3673.0
  • Local history root:

C:\Users\Administrator\.codex\sessions

  • Local history index:

C:\Users\Administrator\.codex\session_index.jsonl

  • Logs root:

C:\Users\Administrator\AppData\Local\Packages\OpenAI.Codex_2p2nqsd0c76g0\LocalCache\Local\Codex\Logs

Affected thread IDs

  • 019e344f-b3f0-79b2-872f-cfa151775bbc
  • 019dde0b-5967-7313-813c-e103d1e2cea1
  • 019e1228-ddec-7230-adfa-fcc0dcce6b87

Symptoms

  1. Project-scoped histories disappeared for multiple projects, including:
  • D:\projects\量化
  • D:\projects\video_play
  • D:\projects\submox
  1. Some local rollout JSONL files still exist and are indexed, but Codex Desktop does not show them under the correct project.
  2. Some conversations open as garbled mojibake text.
  3. Some conversations fail to open entirely and show the generic Desktop error screen.
  4. One observed project path was corrupted from:

D:/projects/量化
to:
D:/projects/閲忓寲
which caused project grouping/history filtering to fail.

  1. Logs showed a renderer/parser failure in LocalConversationPage with an error similar to:

invalid syntax at line 1 col 5: cwd="D:\projects\..."

Local checks

  • session_index.jsonl had 319 valid JSON lines and no JSON parse errors after validation.
  • The affected project sessions existed on disk under ~\.codex\sessions.
  • Some active rollout files were corrupted/garbled, but earlier backups contained cleaner versions.
  • Example: 019e1228-ddec-7230-adfa-fcc0dcce6b87
  • Active file became garbled and shorter.
  • A cleaner backup existed under:

C:\Users\Administrator\.codex\tmp\codex-history-sanitizer-backups\20260517-150540-manual\...

Expected behavior

  • Codex Desktop should preserve local JSONL history as UTF-8.
  • Project-scoped history should group conversations by the correct cwd, including Unicode paths such as D:\projects\量化.
  • A malformed or unrenderable message should not crash the whole conversation page.
  • The app should provide a recovery path when a local conversation record contains invalid markdown/directive syntax.

Actual behavior

  • Project history disappears or is grouped under corrupted paths.
  • Conversations open as garbled text.
  • Some conversations crash the local conversation renderer.
  • Clicking retry opens a new window instead of recovering the selected thread.

Impact

This blocks real work in Codex Desktop. The user cannot reliably access historical project conversations, and new conversations may also become affected after app updates or history rewriting.

Request

Please investigate Codex Desktop local history handling on Windows, especially:

  • UTF-8 preservation for JSONL history files.
  • Unicode project paths in cwd.
  • Project-scoped history grouping from session_index.jsonl and rollout JSONL metadata.
  • Robust rendering of local conversation history when a message contains directive-like text or Windows paths.
  • Recovery tooling for corrupted local history.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗