Skip to content

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

Open

Description

@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
  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.

Activity

  1. added
    bugSomething isn't working
    appIssues related to the Codex desktop app
    windows-osIssues related to Codex on Windows systems
    sessionIssues involving session (thread) management, resuming, forking, naming, archiving
    on May 17, 2026
  2. boombx403-byte commented on Aug 18, 2026

    @boombx403-byte

    Hi @addincaoy1981, your report looks related to a local session discovery/inventory gap rather than necessarily a lost rollout. I've released Codex Rescue Alpha5, a local read-only diagnostic tool that performs filesystem-first discovery across active and archived rollouts and cross-references SQLite/index metadata without modifying any state.

    If you still have the affected local Codex directory, you can inspect it via:

    pip install codex-rescue==0.1.0a5
    codex-rescue sessions --json

    No raw files or databases are needed. If you choose to share output, please review and sanitize any private repository paths or names first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingsessionIssues involving session (thread) management, resuming, forking, naming, archivingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions