openai / openai/codex

Codex App loses task history after restart: thread-history projection ordinal mismatch

Open
#42,241 6 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

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

26.831.2377.0 (Windows x64 package; desktop client log 26.831.21537)

What subscription do you have?

Not known

What platform is your computer?

Windows 11 Pro 10.0.26200 x64; NVIDIA GeForce RTX 3060 Laptop GPU (driver 32.0.16.1088); Intel UHD Graphics (driver 32.0.101.7088)

What issue are you seeing?

After Codex Desktop closes/reopens, a previously completed local task can disappear from the UI or resume with incomplete history.

The local app log repeatedly reports:
failed to project durable rollout ... thread history projection for 01a05df7-f36a-7021-b09c-11ea7ac4da66 expected ordinal 83, got 82

The error occurs while flushing the durable rollout and again when attempting thread/resume. This makes the affected thread fail to reconstruct in the desktop UI.

What steps can reproduce the bug?
  1. Work in a local Codex Desktop task.
  2. Close/restart the desktop app, or resume the task after an unexpected app/system shutdown.
  3. Open the prior task again.
  4. Observe that history is missing or incomplete, and the local log reports the projection ordinal mismatch above.

Affected thread ID: 01a05df7-f36a-7021-b09c-11ea7ac4da66

What is the expected behavior?

The desktop app should restore the complete durable task history and resume the thread without a thread-history projection ordinal mismatch.

Additional information

The raw session record still exists and is valid JSONL (36,632,584 bytes; 4,495 lines; zero invalid JSON lines). Local thread-history and state SQLite integrity checks both return ok, which suggests the raw durable record remains but its UI-history projection is out of sync.

No raw session files or logs are attached because they may contain private data.

Separately, this PC has NVIDIA nvlddmkm Event ID 13 errors and Kernel-Power 41 / BlueScreen 116 / LiveKernelEvent records. These may trigger unexpected shutdowns, but do not explain the persistent rollout projection mismatch after resume.

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 tracing the durable rollout projection and thread/resume entry points that emit the expected-ordinal 83, got 82 error, then reproduce the failure across an app restart using a persisted task. Done means the existing raw session reconstructs complete history in the desktop UI and resumes without a projection ordinal mismatch.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, sqlite
Domain
databases, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.