Skip to content

History projection retries a duplicate ordinal forever #43765

Open

Description

@4Liberty

History projection retries a duplicate ordinal forever

Environment: Codex Desktop for Windows 26.901.51231, paginated thread history.

  1. Create a valid rollout whose projection cursor expects ordinal N.
  2. At that byte offset, place a second thread_settings_applied record with ordinal N-1, semantically identical to the immediately preceding record.
  3. Open/resume the task repeatedly.

Expected: projection treats this exact duplicate as idempotent, advances past it, and continues at N.

Actual: every resume logs expected ordinal N, got N-1; the persisted cursor does not advance, so the same record is retried indefinitely. No rollout mutation is required to reproduce. Suggested fix: accept only an exact adjacent duplicate of an idempotent record type, advance the cursor transactionally, and retain fail-closed behavior for meaningful or compound records.

Activity

  1. added
    bug
    app
    windows-os
    session
    on Sep 8, 2026
  2. parkdohyoun commented on Sep 10, 2026

    @parkdohyoun

    Adding another affected Windows installation with the same history-projection failure signature, verified on 2026-09-10.

    Environment

    • Desktop package: OpenAI.Codex 26.903.8094.0 (installed package metadata).
    • Windows 25H2, build 26200.9445.
    • Affected local session metadata reports cli_version=0.153.4 and history_mode=paginated.

    User-visible impact
    After laptop/app restarts, the same long-running conversation repeatedly reopens at an old unfinished turn from September 8. Later work through September 10 appears missing. The app's newest-first read_thread interface also returns that old turn as inProgress, with no completion time. This is therefore observable in the history read, not just the scroll position.

    Read-only evidence
    The original rollout remains present and contains later user messages, assistant final answers, and task_complete events. A sequential scan of 8,567 JSONL rows found zero JSON syntax errors; the file was approximately 2.56 GB. This establishes syntactic readability, not semantic integrity of every record.

    The affected row in thread_history_projection_state is stuck at:

    next_rollout_byte_offset = 254225593
    next_rollout_ordinal     = 1550
    

    At exactly that byte offset, the original rollout contains:

    offset=254225593
    timestamp=2026-09-08T12:23:05.562Z
    type=event_msg
    ordinal=1549
    payload.type=thread_settings_applied
    

    The next records are:

    offset=254227629  ordinal=1550  event_msg / task_started
    offset=254227877  ordinal=1551  turn_context
    offset=254230172  ordinal=1552  response_item / message
    

    The most recent projected turn starts at ordinal 1397 and still has status=inProgress, completed_at=NULL. Later completed turns remain in the raw rollout but are unavailable through the projected history.

    This warning occurred 338 times in the retained logs at the diagnostic snapshot:

    target=codex_thread_store::local::live_writer
    failed to project durable rollout for <redacted-thread-id>:
    thread-store internal error:
    thread history projection for <redacted-thread-id>
    expected ordinal 1550, got 1549
    

    Requested outcome
    Please provide or identify a supported, non-destructive recovery/reindex path for already-affected conversations, and ensure the recovered history survives another restart. The app should surface incomplete history rather than silently presenting an old turn as the latest.

    The initial triggering event is not established. The restart recurrence is user-reported; the raw-record/projection mismatch and repeated warnings were directly checked. File size or overheating has not been established as the cause. All diagnostics were read-only; no original rollout, database, or cache was edited or deleted. Private conversation content, project files, full personal paths, and raw logs are omitted from this public report.

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

    appbugsessionwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions