Skip to content

[Windows][26.831.1445.0] App update/resume duplicates a rollout ordinal and hides later task history #42157

Open

Description

@Yasei-no-otoko

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

OpenAI.Codex 26.831.1445.0 (the affected thread recorded codex-cli 0.151.0-alpha.7.2)

What subscription do you have?

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

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

After a Codex App update/relaunch, a long-running local task appeared to have lost most of its conversation history. The raw rollout remained complete, but the paginated thread-history projection stopped at one duplicate top-level ordinal.

The app-server initially returned the stale history with no older page available, and a same-directory fork failed with:

failed to prepare paginated fork: thread-store internal error:
thread history projection for <redacted thread id> expected ordinal 7204, got 7203

The canonical rollout JSONL was about 45 MB and still contained all 19 user messages, including the first prompt and the latest prompt. A point-in-time scan found 15,865 valid JSON records and exactly one ordinal discontinuity:

Physical record index Top-level ordinal Record
7203 7203 event_msg/token_count
7204 7203 event_msg/thread_settings_applied
7205 7204 event_msg/task_started

The projection state was:

next_rollout_byte_offset = 33570350
next_rollout_ordinal     = 7204

That byte offset pointed exactly to the second ordinal-7203 record. All other ordinals in the snapshot were strictly sequential, and PRAGMA integrity_check returned ok.

This was transcript projection loss, not transcript deletion.

What steps can reproduce the bug?

The failure is intermittent, but this is the observed sequence:

  1. Use a long-running local Codex App task with paginated history across many turns and tool calls.
  2. Let the Codex App update/relaunch while the task has previously had an interrupted or long-lived turn.
  3. Continue using the same task and add later turns.
  4. Reopen the task after the update.
  5. Observe that the UI stops at an older snapshot even though the rollout JSONL continues to contain later messages.
  6. Attempt to fork the task; the fork fails with expected ordinal N+1, got N.

I did not intentionally force-kill the app for this occurrence. The duplicate appeared at a resume boundary: a thread_settings_applied record reused the preceding token_count ordinal, then task_started used the ordinal that the settings record should have used.

The affected thread ID and raw diagnostics are withheld from the public issue because they contain local task data, but they can be provided through a secure channel.

What is the expected behavior?

  • Every durable rollout record should receive a unique, monotonically increasing ordinal across app updates, restarts, and resumed turns.
  • A duplicate metadata/no-op record should not permanently block projection of all later valid conversation history.
  • On startup, Codex should reconcile or rebuild an inconsistent projection from the intact canonical rollout.
  • The UI should surface an actionable repair error instead of silently showing an incomplete transcript.
  • A supported codex doctor repair/reindex command should be available for already affected tasks.

Additional information

A backup was taken before recovery. Without modifying the canonical JSONL, I advanced only the projection byte offset by 1,564 bytes past the duplicate thread_settings_applied record while keeping the expected ordinal at 7204.

After the next read triggered projection:

  • paginated history returned hasMore: true;
  • the projector caught up to the current rollout tail;
  • 5,103 history items were indexed;
  • all 19/19 user messages were queryable again;
  • SQLite integrity remained ok.

This confirms that the later history was durable and that skipping this verified duplicate metadata record was sufficient for lossless recovery.

Related reports: #42027, #41079, #41566, #41986. The additional evidence here is recurrence on 26.831.1445.0 at an app update/relaunch boundary without an intentional force-kill, plus a byte-exact, no-JSONL-modification recovery.

No thread identifiers, absolute paths, prompts, credentials, or raw logs are included publicly.

Activity

  1. added
    bugSomething isn't working
    appIssues related to the Codex desktop app
    windows-osIssues related to Codex on Windows systems
    app-serverIssues involving app server protocol or interfaces
    on Sep 2, 2026
  2. wxyinucas commented on Oct 5, 2026

    @wxyinucas

    Confirming a closely matching occurrence on macOS (I have not verified whether it shares the same duplicate-ordinal root cause):

    • Codex desktop 26.930.31730 (build 12947, prod)
    • macOS 27.0.1 (26A434), Apple silicon
    • codex-cli 0.160.0

    After an interrupted turn followed by continuation/fork, reopening the original task showed only the earliest turns and recent messages, while thread retrieval returned hasMore: false. A continuation task retained the missing history (240 turns), and the local rollout JSONL files were still present. This likewise appears to be history projection/indexing loss rather than deletion of the underlying records.

    I have not edited the session files or local index. Sanitized diagnostics can be provided privately if useful. A newer desktop build, 26.930.51102 (build 13100), is currently offered; I have not yet retested whether it repairs the affected history.

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

    appIssues related to the Codex desktop appapp-serverIssues involving app server protocol or interfacesbugSomething isn't workingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions