Skip to content

Codex App task history disappears after durable rollout ordinal mismatch #41986

Open

Description

@Nevod-g

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.

Activity

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

    @Nevod-g
    Author

    Additional updater information:

    I attempted to update Codex, but the app reports that it is up to date.

    The desktop logs show the following version mismatch:

    • Installed build: 26.825.6671.0
    • Manifest build: 26.831.1138.0

    Codex checks the Windows Store package OpenAI.Codex, but the update check completes with:

    canSilentlyDownload=true completed=false hasUpdate=false overallState=NoUpdates

    This happened repeatedly. Therefore, the newer build is visible to Codex diagnostics/manifest checking but is not currently being offered by the Windows Store to this device or account.

    I have not reinstalled Codex or deleted the .codex directory because it contains the intact rollout files associated with the missing task history.

  4. ashjo42 commented on Sep 2, 2026

    @ashjo42

    New Windows recurrence on Codex App 26.831.1445.0 (Pro), Codex CLI 0.145.0, Microsoft Windows NT 10.0.26200.0 x64.

    Affected thread: 01a03f1a-375a-70d1-a465-2a125ebd7a16

    The App again stopped showing the later turns of a long-lived local task, while the missing user/assistant events remain readable in the local rollout JSONL. This thread is split across five rollout files; the final segment is about 192 MB and still contains the latest missing turns.

    Read-only codex doctor --all --no-color reports healthy SQLite integrity, but 6 active rollout files are missing from the state DB and 5 duplicate rollout thread IDs exist. Four of the missing-active samples are continuation segments for the affected thread. Rollout scan errors are 0 and malformed filenames are 0.

    No session JSONL, session index, or SQLite files were edited, migrated, replaced, or deleted. This looks like the same projection/inventory-consistency family: source conversation data is intact, but the UI/history projection is incomplete. A supported rebuild/reindex path from the append-only rollout files is still needed.

  5. ex37 commented on Sep 6, 2026

    @ex37

    Additional macOS occurrence with closely matching evidence. Diagnostics used the desktop's bundled Codex engine 0.153.4 on macOS arm64; this is the engine version, not the desktop About-dialog version.

    The desktop UI stops at a September 5 turn even though the saved continuation contains September 6 messages. Fully quitting/reopening the desktop does not restore them. CLI resume works once the desktop releases its active-writer lock, but returning to the desktop still shows the old endpoint.

    Verified storage and API evidence

    • The logical task spans an original rollout and one continuation rollout. The state database already points to the correct continuation file.
    • At the diagnostic snapshot, the continuation was 69,362,045 bytes and all its JSONL records parsed successfully.
    • The continuation's projection is keyed by the continuation UUID, separately from the logical task UUID. Its thread_history_projection_state stops at next_rollout_byte_offset = 22668577, next_rollout_ordinal = 5625.
    • Two consecutive records in the continuation have ordinal 5624: first event_msg/token_count, then event_msg/thread_settings_applied. The saved projection byte offset is exactly the start of the second record.
    • thread/turns/list returns an old latest turn starting at ordinal 5613, despite many later saved turns.
    • Neither rollout contains the empty ## My request for Codex: wrapper discussed in another missing-chat workaround.

    This is consistent with the ordinal/projection failure described here. We have not established what produced the duplicate ordinal or captured a matching projection-error log, so the precise causal mechanism remains unconfirmed. There is no deterministic clean-room reproducer yet.

    Recovery experiment (isolated copy only)

    An isolated recovery test consolidated the intended rollout lineage and used the bundled engine's native legacy-to-paginated migration to rebuild history. After aligning the resulting rollout filename with its projection key, the paginated API returned both the original first turn and the latest September 6 turn.

    The rebuilt index contained 354 turns and all 4,155 distinct completed items from the intended source lineage, verified by (turn_id, item_id) reconciliation with zero missing items. A scoped installer was also tested on a disposable database copy. The live desktop repair has not yet been confirmed.

    This is diagnostic evidence, not a recommendation for users to edit internal history files or enable an experimental migration. An official per-task repair/reindex operation, plus a visible error when saved history cannot be projected, would be valuable.

    No raw conversations, tool outputs, databases, private project paths, or full task identifiers are attached.

  6. daffamzidan commented on Sep 8, 2026

    @daffamzidan

    Additional macOS occurrence of the same visible-history / persisted-rollout discrepancy, reported at the affected user's request. The ordinal-mismatch root cause in this issue has NOT been confirmed for this occurrence.

    Environment:

    • Desktop app bundle version: 26.901.51231, build 8109 (read from the installed ChatGPT.app Info.plist; this is not the bundled CLI version).
    • macOS 26.0.1, build 25A362.
    • Observed September 8, 2026.
    • Existing local Codex task with repeated image-generation revisions and follow-up prompts.

    Observed:

    • The user reports that conversation history has disappeared from the task page.
    • Reading the same task through the Codex app's read_thread tool with turnLimit=3 returns only its initial turn, still marked inProgress.
    • The response has nextCursor=null and hasMore=false, and stops in the early tool activity, omitting later user messages and completed answers.
    • A read-only inspection of the local session JSONL finds 11 user messages and 27 visible assistant messages (16 commentary and 11 final answers) at the diagnostic snapshot. The latest design-revision request, its resulting answer, and the user's missing-history report are all present locally.
    • Nine successive generated-image versions remain on disk.
    • A turn_aborted marker with reason interrupted exists at 2026-09-08 09:45:57 UTC. This is a timeline observation, not proof that interruption caused the discrepancy.

    Expected:
    Previously saved user messages and assistant responses should remain accessible in the task UI. History retrieval should not report hasMore=false while later persisted messages are omitted.

    This was not reproduced from a clean session, and the exact onset and root cause are unknown. No session files or databases were modified during diagnosis. No private transcript, raw logs, artwork, account details, local usernames, or workspace paths are included in this public comment.

  7. andronov-oleg commented on Sep 8, 2026

    @andronov-oleg

    Additional Windows recurrence with the same visible-history / intact-rollout symptom. The ordinal-mismatch root cause has NOT been confirmed for this occurrence.

    Environment:

    • Codex App 26.901.6511.0
    • Microsoft Windows NT 10.0.26200.0 x64
    • Observed September 8, 2026
    • Two long-lived local tasks used as persistent monitoring journals; unrelated tasks still display normally

    Observed:

    • Both tasks remain listed and accept new messages, but the UI shows only the newest messages.
    • The app thread-history API returns only two recent turns for one task and zero turns for the other, with no older page available.
    • The source rollout JSONL files remain readable and continue to grow.
    • At the diagnostic snapshot, rollout A contained 578 valid JSONL records, including 13 turn_context and 259 response_item records. Rollout B contained 208 valid records, including 8 turn_context and 97 response_item records.
    • Rebooting Windows and restarting Codex did not restore the history.

    Reindex experiment:

    • The source rollouts and the original thread_history SQLite database were backed up first.
    • With Codex fully stopped, thread_history_1.sqlite plus its WAL/SHM files were moved aside, then Codex was restarted to build a fresh index.
    • The fresh projection indexed only 7 turns / 92 items for rollout A and 0 turns / 0 items for rollout B, even though rollout B's projection cursor reached EOF.
    • The UI remained unchanged after the clean rebuild.

    Additional observation:

    • Many older persisted records carry the original session timestamp (July 21) even though their turn metadata/current_date represents later activity. This may or may not be related; it is not proof of the root cause.

    Expected: all saved user and assistant turns should remain visible, and a clean history-index rebuild should recover them from intact rollout JSONL files. No raw conversations, server addresses, credentials, local usernames, private paths, databases, or full task IDs are included here.

  8. andronov-oleg commented on Sep 8, 2026

    @andronov-oleg

    Follow-up from the same Windows occurrence: codex doctor --all --no-color completed with Codex Doctor v0.153.4. The only failing check was TERM=dumb, caused by running the command in a non-interactive terminal; this is unrelated to the missing history.

    Relevant results:

    • SQLite integrity passed for the state, logs, goals, memories, queue, and thread-history databases.
    • The rollout inventory currently agrees with the state database: 143 rows/files total, 0 missing rows, 0 stale rows, 0 duplicate rollout thread IDs, 0 malformed filenames, and 0 scan errors.
    • The desktop app-server initialized successfully; provider connectivity and WebSocket checks passed.
    • Codex Desktop 26.901.6511.0 and engine 0.153.4 were reported current.

    This adds an important distinction to the earlier evidence: the doctor now reports healthy databases and a fully consistent rollout inventory, while the two affected tasks still expose incomplete or empty projected history in the UI/API. So the current doctor checks do not detect this content-level projection failure. Full output and private local paths are intentionally omitted.

  9. metze09 commented on Sep 9, 2026

    @metze09

    Additional Windows recurrence, observed September 9, 2026. The ordinal-mismatch root cause in this issue has not been independently confirmed for this occurrence.

    Environment:

    • Windows x64
    • Bundled Codex engine / CLI: 0.153.4
    • Desktop About-dialog version was not available during diagnosis

    Observed:

    • Three long-lived local tasks remain listed, but opening them shows no conversation turns; unrelated tasks still display normally.
    • Reading each affected task through the app's thread-history API returns turns: [], nextCursor: null, and hasMore: false.
    • The corresponding local rollout JSONL files remain readable and non-empty: 8,026,899 bytes / 258 records; 7,307,765 bytes / 294 records; and 142,690 bytes / 31 records.
    • The two larger rollouts contain compaction records with replacement_history arrays of 115 and 144 entries.
    • Fully restarting the Codex desktop app did not restore the visible histories.
    • The source rollout files and local databases were not modified. Read-only copies and human-readable exports were created before any further troubleshooting.

    Expected: all persisted user and assistant turns should remain visible, or Codex should offer a supported per-task reindex/rebuild operation. No transcripts, raw logs, task IDs, account details, local usernames, private paths, or project content are included in this comment.

  10. VictorBezak-4Minds commented on Sep 9, 2026

    @VictorBezak-4Minds

    Additional evidence from macOS, observed September 9, 2026. The visible-history symptoms and saved-log/history-tool discrepancy match this report, although an ordinal mismatch has NOT been confirmed in this case.

    Environment:

    • Codex desktop on macOS 26.6.2, Apple Silicon (arm64).
    • Session metadata records cli_version: 0.153.4, originator: Codex Desktop, source: vscode. This is the recorded runtime version, not a verified About-dialog app build.
    • Affected task ID: 01a086cd-8f23-7302-a19f-0d0233b534c8.

    Observed sequence:

    1. During a long-running local coding conversation, earlier user questions and assistant replies disappeared from the visible task history.
    2. Switching to another task and back did not restore them.
    3. After force-quitting and reopening the desktop app, more messages were missing, including the immediately preceding exchange discussing this bug.
    4. The conversation could still continue.

    Read-only verification:

    • The original user/assistant response_item records still exist as standalone entries in the local rollout JSONL; this is not merely text recovered from a compaction summary.
    • For example, the user message at 2026-09-09T23:20:19.556Z and complete assistant reply at 2026-09-09T23:23:31.131Z remain in that file after restart.
    • The desktop task-history tool (read_thread, turnLimit 10, includeOutputs false) returns only six older turns and pagination metadata with hasMore: false and nextCursor: null.
    • The returned newest turn is marked inProgress and begins much earlier in the conversation; its returned messages omit the later exchanges, including those two records.
    • This discrepancy was verified both before and after the restart.

    Expected: saved user and assistant exchanges remain accessible when reopening the task. If the displayed history cannot be reconstructed, show an explicit error or provide supported recovery instead of silently presenting incomplete history as complete.

    No session files, private project content, credentials, or full transcripts are attached. A deterministic minimal reproduction and the precise root cause are not yet established.

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