[Windows][Migration] Unified ChatGPT Desktop drops existing Codex project-to-thread associations

Open 💬 5 comments Opened Aug 3, 2026 by sitrucp
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of the Codex App are you using (From “About Codex” dialog)?

Unified ChatGPT Desktop for Windows

  • Name: OpenAI.ChatGPT-Desktop
  • Version: 1.2026.190.0
  • PackageFullName: OpenAI.ChatGPT-Desktop_1.2026.190.0_x64__2p2nqsd0c76g0

Previous/installed Codex Windows package

  • Name: OpenAI.Codex
  • Version: 26.727.6591.0
  • PackageFullName: OpenAI.Codex_26.727.6591.0_x64__2p2nqsd0c76g0

Codex CLI used to confirm that the historical sessions still existed

codex-cli 0.146.0

The unified ChatGPT Desktop app does not appear to provide an About dialog showing the package version, so these values were obtained with Get-AppxPackage.

What subscription do you have?

Plus

What platform is your computer?

Operating system information

Windows UI

  • Edition: Windows 11 Pro
  • System type: 64-bit
  • OS build: 26200

PowerShell Get-ComputerInfo

  • WindowsProductName: Windows 10 Pro
  • WindowsVersion: 2009
  • OsBuildNumber: 26200
  • OsArchitecture: 64-bit
Note: The Windows UI identifies the system as Windows 11; the PowerShell ProductName field appears to retain the older Windows 10 label.

What issue are you seeing?

After the Windows Codex app migrated to the unified ChatGPT Desktop app, my existing Codex project organization disappeared.

Projects that previously contained multiple conversations were either missing or empty. The historical conversations appeared individually in Recents instead of beneath their former projects.

No error message, migration warning, or recovery prompt was displayed.

The conversation data itself was not deleted. The local Codex data under %USERPROFILE%\.codex still contained:

  • 124 total threads
  • 105 active threads
  • 19 archived threads
  • 41 recorded working directories
  • session transcript JSONL files
  • session_index.jsonl
  • state_5.sqlite
  • thread titles, IDs, archived status, and original working directories

The database still contained the original cwd for each thread. Individual missing conversations could also be resumed through Codex CLI by thread ID, confirming that the underlying sessions survived.

The apparent failure was specifically the loss or failure to migrate project-to-thread associations.

The older Codex state contained fields such as:

  • active-workspace-roots
  • electron-saved-workspace-roots
  • project-order

The unified ChatGPT Desktop app uses fields including:

  • local-projects
  • thread-project-assignments
  • projectless-thread-ids
  • selected-project

After migration, the new project definitions and/or thread-project-assignments were absent or incomplete, despite the session database retaining enough information to reconstruct them.

This affected a mixture of:

  • normal Windows folders
  • OneDrive-backed folders
  • WSL repositories exposed through \\wsl.localhost\...

The problem was therefore not limited to WSL path handling.

What steps can reproduce the bug?

The trigger appears to be migration from the previous Codex Windows app to the unified ChatGPT Desktop app.

Reproduction steps:

  1. Use the previous Codex Windows desktop app with multiple local projects.
  2. Create multiple conversations within those projects.
  3. Include projects using Windows paths and, optionally, WSL UNC paths such as:

\\wsl.localhost\Ubuntu\home\<user>\projects\<project>

  1. Allow the application to update or migrate to the unified ChatGPT Desktop app.
  2. Open the Codex section in the unified app.
  3. Observe that the former projects are missing, empty, or incomplete.
  4. Observe that historical project conversations appear individually in Recents.
  5. Reopen or recreate one of the same project folders.
  6. Observe that the existing historical conversations are not automatically reattached to that project.

There is no standalone code-only reproduction because the failure occurs during application migration.

The PowerShell snippet inspects project metadata and thread assignments stored in the global state file.

$statePath = "$env:USERPROFILE\.codex\.codex-global-state.json"
$state = Get-Content -LiteralPath $statePath -Raw | ConvertFrom-Json

$projectCount = @(
    $state.'local-projects'.PSObject.Properties
).Count

$assignmentCount = @(
    $state.'thread-project-assignments'.PSObject.Properties
).Count

[pscustomobject]@{
    LocalProjects            = $projectCount
    ThreadProjectAssignments = $assignmentCount
    ProjectlessThreadIds     = @($state.'projectless-thread-ids').Count
}

The following read-only Python snippet complements it by inspecting thread records stored in the SQLite database.

import pathlib
import sqlite3

db_path = pathlib.Path.home() / ".codex" / "state_5.sqlite"

connection = sqlite3.connect(
    f"file:{db_path.as_posix()}?mode=ro",
    uri=True,
)

try:
    total_threads = connection.execute(
        "SELECT COUNT(*) FROM threads"
    ).fetchone()[0]

    active_threads = connection.execute(
        "SELECT COUNT(*) FROM threads WHERE archived = 0"
    ).fetchone()[0]

    archived_threads = connection.execute(
        "SELECT COUNT(*) FROM threads WHERE archived != 0"
    ).fetchone()[0]

    working_directories = connection.execute(
        """
        SELECT COUNT(DISTINCT cwd)
        FROM threads
        WHERE cwd IS NOT NULL AND cwd != ''
        """
    ).fetchone()[0]
finally:
    connection.close()

print("Total threads:", total_threads)
print("Active threads:", active_threads)
print("Archived threads:", archived_threads)
print("Working directories:", working_directories)

In my case, the database reported 124 threads and 41 working directories, while the expected project associations were missing from the migrated application state.

Session IDs are omitted from this public issue because they are persistent account/session identifiers. I can provide affected IDs privately to an OpenAI maintainer if needed.

What is the expected behavior?

What is the expected behavior?

Migration to the unified ChatGPT Desktop app should preserve:

  • all existing project names
  • project root folders
  • project ordering
  • every thread's project association
  • archived-thread project associations
  • Windows paths
  • OneDrive-backed paths
  • WSL/UNC paths

After migration, each historical conversation should remain beneath the same project it belonged to previously.

Reopening an existing project folder should also reconnect historical threads whose recorded cwd matches that folder.

If migration cannot complete safely, the app should:

  1. retain the previous state;
  2. create a timestamped backup;
  3. display a clear migration error;
  4. provide a retry or recovery workflow;
  5. avoid silently flattening project conversations into Recents.

Additional information

Application versions:
Unified ChatGPT Desktop for Windows:
  • Package name: OpenAI.ChatGPT-Desktop
  • Version: 1.2026.190.0
  • Package full name: OpenAI.ChatGPT-Desktop_1.2026.190.0_x64__2p2nqsd0c76g0
Previous/installed Codex Windows package:
  • Package name: OpenAI.Codex
  • Version: 26.727.6591.0
  • Package full name: OpenAI.Codex_26.727.6591.0_x64__2p2nqsd0c76g0
Codex CLI used during diagnosis:
  • codex-cli 0.146.0

The unified app does not appear to expose an About dialog with the installed package version, so the package information was obtained using Get-AppxPackage.

Platform:
  • Windows 11 Pro
  • 64-bit
  • OS build 26200

Get-ComputerInfo returned:

WindowsProductName: Windows 10 Pro
WindowsVersion: 2009
OsBuildNumber: 26200
OsArchitecture: 64-bit

The Windows Settings interface identifies the operating system as Windows 11. I am including the raw PowerShell values because WindowsProductName retains the older Windows 10 label.

Recovery evidence:

I backed up the complete %USERPROFILE%\.codex directory before making changes.

I was able to restore the projects by:

  • reading thread IDs and cwd values from state_5.sqlite;
  • grouping threads by their recorded project working directory;
  • recreating entries under local-projects;
  • creating matching entries under thread-project-assignments;
  • removing restored IDs from projectless-thread-ids;
  • validating the resulting JSON before installing it;
  • reopening the application and confirming the projects persisted after a complete restart.

An assignment created by the unified app had approximately this structure:

{
  "projectKind": "local",
  "projectId": "<project UUID>",
  "cwd": "<project root>",
  "pendingCoreUpdate": false
}

The recovery successfully restored projects including:

  • a WSL project containing 32 active conversations;
  • a Windows project containing 12 active conversations;
  • another project containing 7 active conversations;
  • another project containing 5 active and 2 archived conversations;
  • several smaller Windows and WSL projects.

This demonstrates that the sessions were intact and that reconstructing the missing mappings was sufficient to restore the UI organization.

Important state-overwrite behavior:

My first repair attempt was made while ChatGPT Desktop was still running. The repaired JSON initially validated on disk, but the application later overwrote it from stale in-memory state. The repaired assignment count returned to zero.

The repair persisted only after all ChatGPT, Codex, and OpenAI desktop processes were fully terminated before replacing the state file.

Requested fixes:
  • Migrate previous saved workspace roots into local-projects.
  • Reconstruct missing assignments using each thread's surviving cwd.
  • Support Windows, OneDrive, and WSL/UNC path normalization.
  • Preserve archived-thread project associations.
  • Detect when many existing threads unexpectedly have no project assignment.
  • Back up the state before migration.
  • validate the migrated state before committing it.
  • prevent stale in-memory state from overwriting a repaired or migrated file.
  • show an actionable error instead of silently flattening the conversations.

Please also consider adding an official command such as “Repair/Rebuild project associations.”

That command could scan unassigned threads, group them by cwd, show the inferred projects to the user, and allow confirmation before applying a backed-up and validated repair.

I can provide sanitized versions of the following privately if requested:

  • before-and-after state structures
  • database schema
  • thread/project inventory without conversation text
  • recovery validation output
  • relevant logs
  • sanitized recovery scripts
  • screenshots before and after recovery

I will not publicly upload the complete .codex directory, raw transcripts, unredacted databases, usernames, email content, or private project paths.

View original on GitHub ↗

5 Comments

github-actions[bot] contributor · 25 days ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #36492

Powered by Codex Action

sitrucp · 25 days ago

I reviewed #36492. It appears related, but I do not believe this is an exact duplicate.

In #36492, the reporter describes the entire sidebar as empty, with no projects or conversations visible, and also reports a Windows setup/administrator prompt.

In this issue, the historical conversations remained available and appeared individually in Recents. The underlying sessions, thread IDs, archived status, and cwd values were still present in state_5.sqlite. The specific failure was that the migration did not preserve or generate the corresponding local-projects and thread-project-assignments entries.

I confirmed this by reconstructing those mappings from the surviving database. The projects and their conversations then reappeared and persisted after restarting the app.

This may share an underlying migration cause with #36492, but this report documents a narrower project-association failure mode, confirms that the session data survives, and provides concrete state-schema and recovery evidence.

rtohme · 21 days ago

I'm experiencing the same problem on Codex after updating the unified ChatGPT app to version 26.803.41515 on Windows 10 22H2 (compilation 19045.6466) 64-bit.

leadingproblemsolver · 20 days ago

The successful reconstruction from surviving threads.cwd suggests a useful migration rule: treat project/thread assignments as a regenerable projection, but only from explicitly ranked durable evidence.

I would make the migration/rebuild contract something like:

assignment evidence, strongest -> weakest

1. prior explicit thread_project_assignment
2. prior project root / workspace identity attached to the thread
3. normalized thread cwd exactly under one known project root
4. cwd-derived inferred project candidate
5. no evidence -> projectless, never guess

And persist the result with provenance rather than only the final mapping:

thread_id: ...
project_id: ...
status: confirmed | inferred | ambiguous | projectless
basis:
  kind: prior_assignment | workspace_root | cwd_exact | cwd_inferred
  source: state_5.sqlite:threads.cwd
  observed_value: C:\work\foo
migration_revision: unified-desktop-v1

That buys two things:

  • safe repair: Repair/Rebuild project associations can show exactly why each mapping is proposed and require confirmation for ambiguous cases;
  • future migrations: the app does not need to trust today's derived thread-project-assignments blindly if stronger surviving evidence contradicts them.

The commit should also be transactional: build the proposed projection, validate that every source thread still exists and that each project root normalizes deterministically, write a timestamped backup, then replace the mapping as one logical operation. If validation fails, retain the previous state rather than partially flattening threads into Recents.

A useful invariant is:

UI organization is disposable; the evidence needed to reconstruct it is not.

I have been using the same distinction in a local-first operational-memory compiler: normalized views live in SQLite but every derived record retains source provenance/content identity so views can be rebuilt or challenged rather than becoming untraceable authority: https://github.com/leadingproblemsolver/living-context-engine

For this migration specifically, the important part is less the storage technology than preserving the derivation reason for every reconstructed association.

sitrucp · 20 days ago

BTW I have had Codex ChatGPT (Sol-High) repair this issue twice.

1) Once after the app upgraded on one laptop as described above.

2) Then a second time was on a new laptop with fresh unused Codex ChatGPT app. I had that new Codex ChatGPT app migrate the first laptops codex content eg sqlite, .codex folders, etc (which were in portable ssd usb drive) to replace the new Codex ChatGPT app's config, giving it this issue as reference which it used to successfully update the new laptop's Codex ChatGPT app config to show the projects.