openai / openai/codex

[Windows] Re-added local projects lose historical sessions after project-state/index recovery

Open
#43,661 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug session windows-os
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

Bug

On Windows, Codex Desktop can lose the local project registry after a startup state/index failure. Re-adding the project folders with Ctrl+O restores only empty project shells; historical local sessions are not re-associated with the restored projects. The underlying session data may still exist locally, including image-heavy sessions.

Environment

  • Product: Codex Desktop
  • Platform: Windows
  • Scope: local projects and local sessions
  • Exact app version: [please fill from About Codex]

Observed sequence

  1. Use several local projects and create multiple sessions, including sessions with image/visual content.
  2. Restart Codex Desktop.
  3. The sidebar shows no local projects.
  4. The startup log reports a failure to parse the global state (an unexpected NUL character in JSON).
  5. Re-add the project folders with Ctrl+O.
  6. The folders appear as projects again, but the older sessions are missing from the project history/sidebar. The project contains only the folder/project shell.

Expected behavior

When the local project registry or index is damaged, Codex Desktop should rebuild it from persisted local metadata and re-associate existing sessions with the matching project by canonical path/project identity. Re-adding a folder should not create a new empty project identity that hides the old history. Image-containing sessions should remain discoverable and openable.

Actual behavior

The project folders can be restored manually, but historical sessions are not shown under them. This makes the UI look as if the conversations were deleted, even when the local session files remain on disk.

Requested fix

  • Detect and recover from invalid/corrupt global project state instead of silently starting with an empty project registry.
  • Reconcile existing sessions with re-added projects by canonical path and/or stable project identity.
  • Provide a local “rebuild/reindex projects and sessions” recovery action.
  • Preserve a backup of local metadata before migration.
  • Make image-heavy sessions searchable/openable after recovery.
  • Show a clear diagnostic when project metadata is unavailable.

Privacy

No private session transcript, local absolute path, account identifier, token, or screenshot is included here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Windows startup failure and inspect how the global project state, local session metadata, and Ctrl+O project re-add flow are handled. Done means corrupt metadata produces a clear diagnostic and safe backup, existing sessions are re-associated with matching projects, and image-containing sessions remain searchable and openable.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.