openai / openai/codex

Codex App task history disappears after durable rollout ordinal mismatch

Open
#41,986 9 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app app-server bug 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.825.6671.0

What subscription do you have?

ChatGPT paid individual plan (exact tier not shown in Codex App)

What platform is your computer?

Windows 10.0.26200 (Windows 11 Core), x64

What issue are you seeing?

The Codex App stops displaying later turns from long local tasks even though the underlying rollout JSONL still contains them.

For one affected task, the UI stops at an older message and reports no additional history. Later prompts and completed agent turns remain present in the local rollout file, but they are absent from the app UI and from the thread-history API.

Local logs repeatedly report:

failed to project durable rollout
thread history projection expected ordinal 2143, got 2142

A second task shows the same failure with expected ordinal 2773, got 2772.

No prompt contents, credentials, or private files are included in this report.

What steps can reproduce the bug?
  1. Work in a long-lived local Codex App task over multiple days.
  2. Interrupt or resume a long-running turn and continue using the same task.
  3. Continue sending prompts; the agent completes the work and the rollout JSONL continues to grow.
  4. Reopen the task in the Codex App.
  5. Observe that the visible conversation ends at an older turn. Scrolling cannot load later turns.
  6. Read the task through the app-server thread API: it returns the same old turns with hasMore: false.
  7. Inspect the local rollout JSONL: the missing user and assistant messages are still present.

Affected thread IDs:

  • 01a04f34-f354-7563-af67-7607d666c94a
  • 01a04f9d-1037-7923-ba15-5532841a0f94

The first affected task logged 380 durable-projection failures; the second logged 390.

codex migrate-rollouts --thread --json --verbose reports already_paginated for both tasks, so the supported migration command does not repair them.

What is the expected behavior?

Every successfully saved local turn should remain visible after reopening a task. If the durable history projection becomes inconsistent, Codex should rebuild it from the intact rollout JSONL or provide a supported repair/reindex command. The UI must not report hasMore: false while later durable rollout events exist.

Additional information

Read-only diagnostics:

  • codex doctor --all --no-color reports healthy SQLite integrity but thread inventory issues.
  • 4 active and 3 archived rollout files are missing from the state DB.
  • 5 duplicate rollout thread IDs are reported.
  • Project migration state shows projects migrated while thread assignments are not completed.
  • The affected rollout files themselves remain readable.
  • Reopening, changing models, and resuming the task do not restore the missing turns.
  • A newer desktop build (26.831.1138.0) was reported as available during diagnosis.

This appears to be a projection/index consistency bug rather than loss of the source conversation data.

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 comparing the affected rollout JSONL with the thread-history API output and the repeated durable-projection ordinal errors. Then inspect the behavior of codex migrate-rollouts --thread --json --verbose and codex doctor --all --no-color. Done means later saved turns are visible after reopening, hasMore reflects the remaining events, and a supported repair or reindex path handles the inconsistent projection.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend-api-design, databases
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.