Skip to content

[Bug]: Codex Desktop chats moved into local projects still missing from import after #32880 #34520

Open

Description

@batmanscode

Area

apps/server · Codex project discovery and session import

Version and environment

T3 Code 0.1.10-nightly.20261111.4529 on macOS 26.5.2 (Apple Silicon). Codex Desktop 26.1106.51428, bundled CLI 0.167.0-alpha.4.1. The installed Nightly includes #32880, which closed #32873.

Steps to reproduce

  1. In Codex Desktop, start a chat with No project, then move it into an existing local project. Use a normal Git repository outside ~/Documents/Codex as the project root.
  2. For the affected storage case, confirm that the desktop sidebar shows the chat in the project, the desktop state contains an explicit project assignment, and the thread's SQLite project_id is still NULL.
  3. In T3, open Settings → About → Welcome page → Open, then Projects → Review all. Use a recent chat whose rollout is still a plain .jsonl file.

Expected behavior

A recent chat with an explicit local project assignment in Codex Desktop can be imported under that project's actual folder. A project with only such chats should appear in the candidate list.

Actual behavior

On the reported Mac, the initial import populated nine projects and 16 Codex chats. Three other local Git project roots were absent both from T3's project list and from the reopened Review all list. Expanding Other folders did not reveal them.

Read-only evidence from the affected installation

Nine recent plain .jsonl rollouts across the three missing projects shared the same pattern:

Metadata Observed value
Codex Desktop .codex-global-state.json → thread-project-assignments[threadId] Explicit assignment with projectKind: "local"
local-projects[assignment.projectId].rootPaths in the same file Existing Git project root outside the scratch tree
First rollout record, session_meta.payload.cwd A dated scratch folder under ~/Documents/Codex
state_5.sqlite → threads.project_id NULL
state_5.sqlite → threads.cwd The target root for four of nine, so using that field alone would still miss the other five

This is actual macOS UI and local metadata evidence. The steps above describe the affected storage shape; a fresh Codex profile was not used to reproduce creation of that shape. No chat content, local paths, project names, or IDs are attached.

Why this can still happen after #32880

The installed scanner joins threads.project_id to project_roots.project_id to recover project roots for scratch chats. A NULL project_id yields no match, so this desktop storage case never reaches that fallback. #32880 tested the app-server assignment path where the SQL join succeeds. The observed files are recent plain rollouts, so #21755 is a separate issue.

Could the scanner also resolve explicit local Desktop project assignments when the SQL join has no match? A regression fixture could include one desktop-assigned scratch chat and one genuinely projectless chat with the same scratch-folder shape.

Impact and workaround

Major degradation for migration. Reopening the Welcome page rescans for eligible sessions, but these projects remain absent. Adding the folder manually allows new T3 chats; no supported way to import the affected existing chats was verified.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions