codex - 💡(How to fix) Fix Codex Desktop corrupts local history on Windows: project sessions disappear and UTF-8 Chinese history becomes mojibake

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

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.

Error Message

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: 4. Some conversations fail to open entirely and show the generic Desktop error screen. 6. Logs showed a renderer/parser failure in LocalConversationPage with an error similar to:

Root Cause

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.

Code Example

糟糕,出错了
检查更新
重试
RAW_BUFFERClick to expand / collapse

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
  2. Some local rollout JSONL files still exist and are indexed, but Codex Desktop does not show them under the correct project.
  3. Some conversations open as garbled mojibake text.
  4. Some conversations fail to open entirely and show the generic Desktop error screen.
  5. One observed project path was corrupted from: D:/projects/量化 to: D:/projects/閲忓寲 which caused project grouping/history filtering to fail.
  6. 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.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

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.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Codex Desktop corrupts local history on Windows: project sessions disappear and UTF-8 Chinese history becomes mojibake