Repository navigation
macOS desktop task history freezes at Thursday: duplicate ordinal 12165 at stalled projection offset while Sunday transcript remains intact #43451
Description
Summary
A long-running local desktop task repeatedly reopens at an old Thursday checkpoint, hiding Friday–Sunday messages even though the durable rollout contains those actual user/assistant messages. Read-only inspection found a duplicated serialized ordinal exactly at the stalled history projection offset.
Possibly the same defect as #43124 and #41566; this adds a macOS reproduction with the duplicate record and projection cursor directly compared. No claim that the original transcript was deleted.
Environment
- Desktop app: 26.901.20858 (CFBundleVersion 7658), installed as ChatGPT.app with the Codex task interface.
- Bundled Codex:
codex-cli 0.153.0-alpha.5. - Affected thread metadata records writer CLI version
0.150.0-alpha.8; this is not assumed to be the current writer. - Separately installed standalone CLI:
0.146.0(diagnostic version check only). - macOS 26.6.2 (25G83), arm64.
- Incident observed September 7, 2026, America/Chicago.
- Thread history mode:
paginated.
User-visible behavior
The newest historical turn returned by the desktop task-reading interface is a turn started September 3 at 17:41 Central. It remains marked in progress in the derived history. The user worked through Sunday evening, but reopening the same task presents the older checkpoint.
The canonical transcript contains actual later messages, including a Sunday September 6 21:58 Central assistant completion, a subsequent user approval, and a 22:53 Central assistant final response. The underlying project commit and prepared artifacts also remain intact. This is a history reconstruction failure, not evidence of reverted project files.
Read-only evidence
For the affected thread, thread_history_projection_state repeatedly returned:
next_rollout_byte_offset = 134855731
next_rollout_ordinal = 12166
Derived thread_items:
row count = 3552
maximum rollout_ordinal = 12163
maximum created_at_ms = 1788475443401
At byte offset 134855731 in the canonical rollout, the next record is:
physical line: 12167 (1-based)
previous record's serialized ordinal: 12165
current record's serialized ordinal: 12165
timestamp: 2026-09-03T23:00:59.447Z
type: event_msg
payload.type: thread_settings_applied
The following record is task_started with ordinal 12166. Thus the cursor expects 12166 but encounters a second 12165 at exactly its next byte offset.
A complete streamed scan at the later diagnostic snapshot read 24,522 JSONL records / 973,690,804 bytes and found this single serialized-ordinal discontinuity. An earlier complete JSON parse found zero malformed JSON lines. The transcript continues through Sunday and the current Monday conversation; it was not truncated at the projection boundary.
The normal newest-first task-history lookup returns the old September 3 turn even though thread metadata's updated time is current. This independently reproduces the user's UI observation.
Observed sequence
- Continue a local desktop task across several days with tool output and images.
- Leave and reopen the task.
- See historical messages stop at an older Thursday turn.
- Compare the same task's raw rollout with the derived history tables, read-only.
- Find a duplicate ordinal at the exact stalled projection offset while later messages remain present in the rollout.
The initiating event that wrote the duplicate is unknown. The evidence localizes the inconsistency; it does not establish whether a particular resume, compaction, update, or interruption caused it. No matching explicit projector error was found in the narrowly inspected September 6–7 desktop text logs.
Expected behavior
- Reopening the task should expose all durably saved messages.
- Detect and safely recover a duplicate ordinal, or show a clear actionable history-reconstruction error instead of silently presenting stale history.
- Provide a supported non-destructive per-thread verification/reindex/recovery path.
- Preserve original transcript data and make any recovery auditable.
Privacy / actions taken
This report contains sanitized structural metadata only. No thread UUID, personal paths, project names, conversation bodies, screenshots, credentials, signed URLs, raw logs, or database/transcript files are attached. All diagnostic database opens were read-only. No history database rows or original rollout files were edited/deleted, and no reset/reinstall/reindex was attempted.
Activity
github-actions commentedon Sep 7, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
argszero commentedon Sep 7, 2026
Confirmed same family as #41566 / #43124 / #43182 / #43142 — and your byte-level evidence is a textbook instance: the cursor expects ordinal 12166 while the line at the stored offset is a duplicated
thread_settings_applied@ 12165, withtask_started @ 12166immediately after. That is the resume-reused-ordinal producer defect (pre-#42378 runtimes; your thread's writer version 0.150.0-alpha.8 predates the fix), and the duplicate sits on atoken_count → thread_settings_applied → task_startedboundary exactly like every other report.Two things to know:
mainmaterializer (Keep SQLite history projection moving past invalid records #42369, merged Sep 2) skipsordinal < next_ordinallines with a recordedDuplicateOrRegressedOrdinalanomaly and advances the cursor, so opening/resuming the thread on a build containing Keep SQLite history projection moving past invalid records #42369+Route rollout reads through the canonical JSON decoder #42378 should self-heal from exactly your checkpoint (12165 dup skipped → 12166task_startedprojects). Neither fix is in any stable 0.153.x — the newest build with both isrust-v0.154.0-alpha.3; I recovered a long-running Codex thread with missing history | Chat History is not beeing Displayed #43262 empirically showed a stalled 608MB thread fully reprojecting on that line.already_paginated/strict-apply_projectionrecovery dead-ends you're describing — is the open work item; I posted a consolidated status (mechanism, fix state, remaining gaps, and the full issue family map) on the canonical thread Codex paginated rollout can emit duplicate ordinal after unfinished turn, permanently freezing thread history projection #41566: Codex paginated rollout can emit duplicate ordinal after unfinished turn, permanently freezing thread history projection #41566 (comment)Your suggested "detect and safely recover a duplicate ordinal, or show a clear actionable history-reconstruction error instead of silently presenting stale history" is exactly the right product requirement — it matches the typed-outcome design 4Liberty published on #41566 (repaired/unrecoverable surfaced to the client) and is worth a maintainer's eyes.