Skip to content

Codex Desktop project sidebar loses thread history when switching between Windows and WSL path views #30737

Closed

Description

@M0M0KO

Environment

  • OS: Windows
  • Codex Desktop version: 26.623.9142.0
  • Projects are stored on a non-system drive
  • The same projects may be opened through both Windows paths and WSL paths

Problem

After a system crash/restart and later switching between Windows and WSL workspace views, Codex Desktop stops showing historical threads under the correct project in the sidebar.

The thread data is not deleted:

  • Search can still find the threads.
  • Raw session files still exist under ~/.codex/sessions.
  • SQLite indexes still contain thread rows.

However, the project sidebar shows no conversations, incomplete conversations, or conversations briefly appear and then disappear after background indexing.

Observed path mismatch

The same workspace can appear in several incompatible forms:

D:\Projects\ProjectA
/mnt/d/Projects/ProjectA
\\?\D:\Projects\ProjectA

In one case, Codex appeared to treat a Windows path as relative and prepended the app resources directory:

<Codex WindowsApps package>/app/resources/D:\Projects\ProjectA

This causes project/thread grouping to break.

Affected local state

The mismatch appears across:

~/.codex/sessions/*.jsonl
~/.codex/state_5.sqlite
~/.codex/sqlite/codex-dev.db
~/.codex/.codex-global-state.json

Examples of affected fields:

session_meta.cwd
turn_context.cwd
turn_context.workspace_roots
threads.cwd
local_thread_catalog.cwd
electron-saved-workspace-roots
active-workspace-roots
project-order

Expected behavior

Codex should canonicalize Windows drive paths, WSL /mnt/... paths, and \\?\ long-path-prefixed Windows paths as the same workspace when they refer to the same underlying folder.

It should also avoid prepending the app resources path to Windows-style cwd values.

Actual behavior

Threads are still searchable, but project sidebar grouping becomes unstable:

  • Some project histories disappear.
  • Some threads appear briefly and then vanish.
  • Background indexing seems to rewrite or reclassify paths inconsistently.

Why this matters

This looks like a path canonicalization/indexing issue rather than data loss. Users may think their history disappeared, while the raw session files and database rows are still present.

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 Jun 30, 2026
  2. M0M0KO commented on Jun 30, 2026

    @M0M0KO
    Author

    Thanks. I reviewed the suggested issues.

    This is related to #30288 and #30435, but I think it is not an exact duplicate.

    The key difference here is that the same workspace is being indexed under multiple path identities across Windows and WSL views:

    • D:\Projects\ProjectA
    • /mnt/d/Projects/ProjectA
    • \?\D:\Projects\ProjectA
    • /app/resources/D:\Projects\ProjectA

    The visible symptom is that project history can briefly appear in the sidebar and then disappear again after background indexing. The raw session files and SQLite rows still exist, so this looks like a path canonicalization / local catalog rebuild issue rather than data loss.

    #30435 looks closest for the malformed app/resources/...C:\... cwd issue, while #30288 looks closest for WSL path personality causing project chats to disappear. This issue adds the Windows drive <-> WSL /mnt/... <-> long-path-prefix mismatch across state_5.sqlite, codex-dev.db, .codex-global-state.json, and session JSONL metadata.

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