macOS desktop history freezes at older turns: projection expected ordinal 3185, got 3184; migration says already_paginated
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
Environment
- Desktop app version: 26.901.41600
- Bundled Codex CLI: 0.153.4
- macOS 26.6 (25G72), Apple Silicon
Problem
A long-lived local conversation displays only older Thursday messages. Friday, Saturday and Sunday messages disappear from the desktop UI, while their actual user and assistant entries remain in the append-only local JSONL. The problem has recurred. This is not an archived thread.
Verified read-only evidence
- Raw rollout is approximately 2.1 GiB, with over 24,000 JSONL records; a complete scan found zero malformed JSON lines.
- Actual user/assistant message entries exist on September 4, 5 and 6, 2026 (UTC+08:00), not merely file modification timestamps.
- The affected thread's
thread_history_projection_stateremains atnext_rollout_byte_offset=53851170,next_rollout_ordinal=3185. thread_itemshas 1,080 entries for this thread; max rollout ordinal is 3182 and latest created_at is 2026-09-03 09:27:56 UTC.- Desktop log records a failed
thread/reverton 2026-09-05 12:48:55 UTC:
failed to revert session: thread-store internal error: thread history projection ... expected ordinal 3185, got 3184 - The desktop thread-reading interface similarly returns an old turn when asked for the newest turn, despite later durable messages.
- The bundled CLI dry run
codex migrate-rollouts --thread <affected-id> --jsonreturnsalready_paginated, with 0 bytes processed; it does not offer a repair path.
Reproduction observed
- Continue a local desktop conversation over several days, with images and tool output.
- Reopen/view the task history.
- Observe that later days of messages are absent from the UI despite remaining in the raw transcript.
- Inspect projection state and logs: history projection is stuck with the ordinal mismatch above.
The exact initiating event is unknown; the failed revert is evidence of the inconsistency, not a proven cause.
Expected behavior
Saved conversation entries should remain accessible. A projection mismatch should recover safely from the intact durable transcript, or there should be a supported per-thread repair/reindex command. already_paginated must not prevent repair of an incomplete projection.
Related reports
Possibly the same issue family as #41986 and #42241, here reproduced on macOS and bundled CLI 0.153.4.
Privacy and safety
No conversation content, screenshots, credentials, raw session files, personal paths, or complete logs are attached. No SQLite rows or original transcript files have been edited or deleted during this investigation.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the thread_history_projection_state and thread_items handling, then inspect the bundled migrate-rollouts path for the already_paginated result. Reproduce the ordinal mismatch using the supplied projection state and durable JSONL evidence; done means later entries are accessible or a supported per-thread repair path exists without altering the transcript.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend, database
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100