Repository navigation
[Desktop][Windows] Paginated thread history stalls on duplicate ordinal while rollout remains complete #41079
Description
Summary
On Windows Codex Desktop, one local paginated thread displayed only an older history snapshot although the canonical rollout JSONL still contained all later messages and the completed task. This was a local history-projection stall, not transcript deletion.
Environment
- OS: Windows 11 x64
- Installed Codex Desktop package: 26.820.9563.0
- Thread-recorded runtime: codex-cli 0.149.0-alpha.4.1
- History mode: paginated
Sanitized evidence
- The rollout JSONL remained parseable and contained exactly one repeated ordinal: ordinal
2186appeared twice. - The two records were
event_msg/token_countandevent_msg/thread_settings_applied. thread_history_projection_stateexpected ordinal2187at the byte offset where the second ordinal-2186 record began.- The projection repeatedly logged an error equivalent to:
expected ordinal 2187, got 2186. - The SQLite projection stopped at an earlier ordinal while later user/assistant records and task completion remained present in the rollout JSONL.
- SQLite integrity checks were clean; there was no evidence of physical database corruption.
- After backing up the files, advancing only the projection byte offset past the duplicate record while keeping the expected ordinal at
2187allowed the projection to catch up. The canonical JSONL was not modified.
Expected behavior
When a paginated history projection encounters a duplicate boundary ordinal, Codex should reconcile or rebuild the projection from the canonical rollout, or safely skip a verified duplicate metadata record. It should not silently leave the UI permanently behind the durable transcript.
Likely cause
This appears related to duplicate ordinal assignment during restart/resume or concurrent app-server writers, combined with a projector that treats a lower ordinal as fatal and has no automatic recovery path. Related reports include #40109 and #40178. Issue #32198 is related to Windows paginated-history handling but appears distinct: it concerns legacy tool_search_output parsing/replay UI freezing, not duplicate ordinals or a frozen SQLite projection.
Requested fixes
- Serialize rollout writers and refresh the durable tail before assigning paginated ordinals.
- Detect byte-offset/ordinal mismatches on startup and rebuild or reconcile
thread_history_*. - Provide a supported history repair/doctor command.
- Surface an actionable error instead of silently showing stale history.
Privacy
No thread ID, absolute paths, prompts, conversation content, credentials, or raw logs are attached.
Activity
github-actions commentedon Aug 27, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
wangistiger-beep commentedon Aug 27, 2026
Additional reproduction on Windows 10 build 19045, package 26.820.9563.0, desktop client 26.820.71523, app-managed backend codex-cli 0.150.0-alpha.8.
Read-only inspection of six affected local tasks confirms the same precise boundary pattern described in this issue: event_msg/token_count followed by event_msg/thread_settings_applied, both carrying the same top-level ordinal. The projection expects the next ordinal and stops updating.
Sanitized samples
Each row is a different task; all task identifiers and conversation content are omitted.
Sample A's persisted projection checkpoint is:
{"next_rollout_byte_offset":11328572,"next_rollout_ordinal":987}Immediately before that byte offset:
{"timestamp":"2026-08-27T18:59:09.760Z","ordinal":986,"type":"event_msg","payload":{"type":"token_count"}}At that byte offset:
{"timestamp":"2026-08-27T19:00:00.849Z","ordinal":986,"type":"event_msg","payload":{"type":"thread_settings_applied"}}These are field-reduced excerpts; other payload fields are intentionally omitted, not empty in the source.
The repeated error is:
Durable data versus visible history
There are also recurring authentication-triggered sign-outs on this machine; separate evidence is being added to #39189. The projection checkpoint had already stalled before the captured sign-outs. A sign-out/restart then makes the UI reload the old cached history, so recent conversation appears to have disappeared despite remaining in the raw rollout. We are not asserting permanent transcript deletion or that authentication caused the duplicate ordinal.
Requested investigation
Please investigate ordinal allocation across the token_count -> thread_settings_applied boundary and provide automatic safe reconciliation, or a supported history repair mechanism, plus an explicit stale-history warning instead of silently showing an old transcript.
We have not applied the manual byte-offset workaround in the opening report, changed affected rollout files, or patched the affected projection checkpoints. An official repair path would be preferable to users guessing which records are safe to skip.
No thread IDs, account information, local paths, prompts, source documents, credentials, raw log archives, or databases are included in this comment.
vars0 commentedon Aug 28, 2026
Fresh reproduction on a newer Windows Desktop build, with a higher-impact failure mode than stale history alone.
Environment
26.825.3734.0codex-cli 0.150.0-alpha.12.2Sanitized sequence
2026-08-28 04:10:37Z, the rollout appendedevent_msg/token_countwith ordinal166.04:10:53Z,event_msg/thread_settings_appliedwas appended with ordinal166again.thread history projection ... expected ordinal 167, got 1663221225786(0xC000013A) — observed again around04:14:38Z,04:19:52Z, and04:27:21Z.The important additional impact is that this poisoned single thread does not only show stale history: the recurring global app-server restart interrupts active turns in other Desktop tasks as well. One separate task was observed being marked
interruptedduring recovery.A read-only scan of nine recent session rollouts found only the active affected rollout with an ordinal defect (one duplicate, no gaps). The machine had ample free memory and no matching Windows Application Error/Hang or resource-exhaustion event, so this does not look like memory pressure or an OS crash.
The app had recently been reset; this thread and the duplicate were created after that reset, so reset/reinstall is not preventive.
Requested containment
No thread IDs, absolute paths, prompts, conversation content, call IDs, credentials, or raw logs are included here. A local observer is retaining privacy-sensitive incident bundles for private follow-up if maintainers request them.
vars0 commentedon Aug 28, 2026
Follow-up with local mitigation results and a remaining failure mode: the restart loop can be contained, but the originally poisoned thread still cannot display or continue follow-up turns.
Actions performed locally
All changes were preceded by local backups. No canonical rollout JSONL was modified.
166and later448.72.N;N-1;N;1,907,105 -> 1,908,709, expected ordinal remains167.1,586,937 -> 1,588,523, expected ordinal remains73.PRAGMA quick_checkreturnedok.448;3,505,250 -> 3,506,854;449;ok.Outcome
The mitigation partially worked:
73to192.Current sanitized Thread A state:
851and still growing;1,908,709;167;164;55;2;ok.After restart,
thread/resumereturns success but reports only the old interrupted turn andturnCount=2. Newturn/startrequests also return success with no RPC error, and the engine emits reasoning activity for the new turn, but the Desktop history/UI does not advance. To the user, follow-up messages in this thread appear to do nothing.This demonstrates a second containment gap: advancing past a verified duplicate boundary is sufficient for one thread but not enough to recover every already-wedged projection. The durable rollout can continue to append hundreds of valid ordinals while the materialized history remains frozen without surfacing an error.
Requested product fix
rollout latest ordinal >> projection ordinalafter resume and rebuild instead of returning a successful but stalethread/resume.turn/startif the new turn cannot become visible through the thread projection.history repair/reindexcommand and keep one poisoned thread from affecting the shared app-server.No thread IDs, local paths, prompts, conversation content, credentials, or raw logs are included. Backups and incident bundles are retained locally for private follow-up.
zshs000 commentedon Aug 28, 2026
Adding one untouched/read-only data point for the
rollout latest ordinal >> projection ordinalcase mentioned above.On another Windows 11 paginated thread using recorded runtime
codex-cli 0.149.0-alpha.4.3, I found exactly one non-monotonic boundary in the entire rollout:The persisted projection cursor expected
20196at exactly the byte offset where the second20195began.The canonical rollout remained valid and continued normally through ordinal
21535, while the history projection remained stuck at that duplicate boundary.No rollout or SQLite repair has been applied; the original stalled state is still preserved for read-only inspection if maintainers need additional sanitized checkpoint/offset metadata.
TryDotAtwo commentedon Aug 28, 2026
Follow-up from a second affected Windows store, plus a tested defensive patch.
Additional evidence
PRAGMA quick_check,foreign_key_check, and migration checks. This is a logical projection stall, not database corruption.failed to project durable rolloutwarnings.thread_history_projection_state, I found 10 non-monotonic ordinal transitions.token_count:N,N+1thread_settings_applied:Nthread_goal_updated:N+1N+2The projector currently treats every
ordinal < next_ordinalas fatal. That means even stale records which produce no thread-history changes permanently wedge the projection before it reaches valid later turns.Proposed narrow recovery
I prepared a minimal patch here:
TryDotAtwo@c148c15
It skips a stale ordinal only when all of these are true:
project_rollout_lineproduces neither changed turns nor changed items;Meaningful duplicate/out-of-order records still fail closed, so the existing corruption guard remains intact. This is deliberately a projector resilience fix; writer serialization/tail refresh should still be addressed separately to prevent duplicate assignment at the source.
Verification
1, followed by a validturn_startedat ordinal2.expected ordinal 2, got 1.2.cargo test -p codex-thread-store— 235 passed, 0 failed.The repository contribution policy does not accept external PRs, so I am attaching the tested implementation here for maintainers to cherry-pick or adapt.
TryDotAtwo commentedon Aug 28, 2026
Opened #41353 to track the broader producer-side root cause: competing/stale paginated rollout writers emitting overlapping ordinal sequences across multiple live threads. This issue remains the concrete UI/projection-stall symptom report.
Gavin-Qiao commentedon Aug 28, 2026
Independent confirmation on Codex Desktop for macOS while accessing a remote Linux project, observed across Codex 0.149.0 and 0.150.1. The canonical paginated rollout remained parseable and contained later valid records, but the displayed task history consistently stopped at the same older boundary. Restarting Codex and upgrading did not rebuild or advance the projection.
Sanitized inspection showed the same structural failure class: a repeated boundary ordinal involving a
token_countrecord and subsequent metadata, followed by anexpected N+1, got Nprojection failure. This appears to connect the desktop symptom here with #35746.No transcript content, thread/session IDs, project names, paths, timestamps, exact ordinals, credentials, screenshots, or raw logs are being shared. A regression test should be reproducible with entirely synthetic rollout records.
cis-aconiticacid commentedon Aug 28, 2026
I traced one reproducible source of the duplicate ordinal reported here.
On restart, the recorder scans the end of a paginated rollout to recover the next ordinal. If the final record is a
token_countevent with nested floating-point rate-limit values, deserializing it directly asRolloutLinecan fail whenserde_json/arbitrary_precisionis enabled.The scanner skips that valid record, falls back to the preceding one, and then reuses the skipped ordinal. The regression test produces
0, 4, 5, 5before the fix and0, 4, 5, 6afterward.PR #38399 added
decode_rollout_linefor this serde compatibility case, but the ordinal tail scanner still used direct deserialization. The reference patch routes that scan through the existing decoder:just test -p codex-rolloutpasses all 127 tests, including the new restart regression test.I’m posting the tested branch here as a reference for an OpenAI-owned fix. This prevents this restart path from creating new duplicates.
XingChen15 commentedon Aug 29, 2026
Confirming the same side-chat failure on a newer Windows package, with a
token_count -> task_startedduplicate boundary.Environment
26200.9168OpenAI.Codex 26.825.5331.0codex-cli 0.151.0-alpha.7.1Exact failure
Opening a side chat invokes
thread/forkand returns-32603:The sanitized duplicate boundary is:
The persisted projection checkpoint is:
That byte offset points exactly at the second ordinal-30263 record.
Durable history versus projection
53965.30264.1.83 GBwith about44,000records, but the fork fails quickly with the deterministic ordinal mismatch above, so file size alone does not explain the failure.PRAGMA quick_check(1)returnsok.codex doctorreports the databases as healthy and says rollout/state-DB inventory agrees, so the current doctor checks do not detect this semantic projection stall.The local session index also contains duplicate display entries for the same conversation, with one automatically suffixed
(2). This may be related to restart/resume or migration behavior, although the immediate side-chat failure is the duplicate ordinal boundary above.No thread IDs, account information, project names, absolute paths, prompts, conversation content, credentials, databases, or raw logs are included.
abangkis commentedon Aug 30, 2026
Additional Windows reproduction with repeated Codex Desktop crashes:
26.825.6671.0; bundled Codex CLI0.151.0-alpha.7.1; paginated history.expected ordinal N, got N-1failure independently occurred across at least four newly created task contexts:4714/4713,3496/3495,2114/2113, and4630/4629.history_base, so recreating the task did not prevent recurrence.codex_thread_store::local::live_writeremitted at least 1,145 projection warnings.thread_history_projection_stateexpected ordinal4630, but its stored byte offset pointed to ordinal4629. SQLitePRAGMA integrity_checkreturnedok, the rollout remained parseable, and continued through at least ordinal4999.4629record to the start of ordinal4630would move it from35,818,906to35,821,878, while keepingnext_rollout_ordinal = 4630.This extends the original report by showing recurrence across clean replacement tasks and correlation with repeated Desktop browser crashes. No thread IDs, prompts, credentials, absolute paths, or raw transcripts are included.
8 remaining items
scraptechindustries commentedon Sep 4, 2026
Independent Windows reproduction on a newer Desktop build with the same duplicate-ordinal boundary and a non-recovering projection.
Environment
26.901.4073.0User-visible behavior
A long-running task displayed only part of its chat history even though current work continued successfully. Read-only task history surfaced an older projected turn as the latest turn after a newer canonical turn had completed.
Canonical rollout versus projection
task_started, 52task_complete, and fourturn_abortedeventsThe exact boundary was:
The structured log database retained 411 task-tagged projection failures with the same message:
Those retained failures span almost 23 hours. Every later durable append retried the same rejected boundary, but the projector did not reconcile, skip the verified duplicate metadata record, or rebuild. The unprojected suffix parsed with zero errors and remained ordinal-sequential after the duplicate. The newest turn completed normally in the canonical rollout.
This confirms the exact #41079 mechanism persists in
26.901.4073.0: duplicate ordinal assignment involvingtoken_countandthread_settings_applied, followed by permanent projection lag while the canonical task continues. Aggregate task size may make the impact larger, but it is not the immediate failure mechanism in this case.Expected behavior
The projector should prevent duplicate ordinal assignment or automatically reconcile/rebuild from the canonical rollout when it encounters this safe duplicate-metadata boundary. A projection failure must not silently hide all later completed turns, and repeated append attempts should not emit the same warning indefinitely without recovery.
Privacy
No task title or ID, local path, prompt or transcript text, username, repository name, raw log, screenshot, request ID, credential, or project data is included. No internal history or projection files are attached.
wcs891016-creator commentedon Sep 4, 2026
Additional sanitized Windows reproduction of the duplicate-ordinal / stalled-history-projection failure, posted with the affected user's explicit permission.
In-app feedback/session ID for correlation:
01a04ce5-546e-73a0-bb7a-9b93f142882eCurrent symptoms and verified evidence
3626, with ordinal3625at its stored byte offset.event_msg/token_countfollowed byevent_msg/thread_settings_appliedwith the same top-level ordinal.Isolated tests only — not a recommended workaround
The original files were preserved. Tests used separate state directories without credentials or model turns:
thread/readandthread/turns/listagainst a fresh history database returned empty history rather than rebuilding it. Nothread/resumewas attempted in this test.codex migrate-rollouts --thread <id> --json, without--apply, returnedalready_paginatedand processed zero bytes.The installed executable used for these isolated tests reported
codex-cli 0.153.1. This is not a verified version identification of the running desktop application's bundled backend. No candidate was copied into production; no production projection was edited or cleared.Requested guidance
Could maintainers associate the feedback ID above with this issue and confirm:
The cause of duplicate assignment itself is not established by this local check; network, sleep and restart correlations should not be treated as proven causes.
No conversation text, task title, holdings, screenshots, credentials, local paths, raw logs or databases are attached. Only the explicitly authorized feedback ID and sanitized structural findings are shared.
mjmotamedi commentedon Sep 4, 2026
I can confirm this exact failure pattern on Windows with Codex CLI 0.153.1.
I have two independent affected local threads.
Thread A:
expected ordinal 24775, got 24774
Thread B:
expected ordinal 2796, got 2795
The affected projection state is in thread_history_1.sqlite.
I also performed an isolated recovery rehearsal on copied state only.
Tested:
Native migrate-rollouts inspection
-> both affected threads report already_paginated.
Native read/resume against the copied faulty state
-> ordinal mismatch repeats; history stays truncated.
Remove only the affected derived projection rows, then native read/resume
-> zero turns returned; no rebuild occurred.
Start with a fresh history DB, then native read/resume
-> zero target turns returned; no historical backfill occurred.
Therefore, on 0.153.1, deleting projection rows or replacing thread_history_1.sqlite is not a working recovery path.
No live Codex state was modified.
The canonical rollout transcripts are still intact, so recovery should be possible if Codex exposes a supported replay/rebuild mechanism.
This appears to be the same class of failure described here: a repeated/older ordinal permanently stalls the paginated history projection while the durable rollout continues growing.
If useful, I can provide sanitized:
without sharing prompts, thread IDs, absolute paths, or project contents.
mjmotamedi commentedon Sep 4, 2026
I was able to recover the affected thread successfully and verify the fix in the live Codex Desktop UI.
Environment:
Root cause confirmed:
The affected rollout contained repeated ordinal metadata records with this pattern:
token_count N
thread_settings_applied N
task_started N+1
In my larger affected thread there were exactly two such anomalies.
The projector stopped at the first one with:
expected ordinal 24775, got 24774
After bypassing that boundary in an isolated test, it later stopped again with:
expected ordinal 29058, got 29057
A full scan of the 47,766-record rollout found exactly two ordinal anomalies:
Both duplicate records were
thread_settings_applied.Recovery method that worked:
thread_settings_appliedrecords.Important detail:
The first duplicate record was located exactly at the existing
next_rollout_byte_offset.
After removing that duplicate, the next valid
task_startedrecord with theexpected ordinal occupied the same logical cursor position.
Therefore no history DB cursor edit was required.
Isolated recovery result:
Before:
After:
The native paginated API returned the complete history and the repaired
projection survived restart.
I then performed the same procedure against the live thread using:
Live result:
119 turns / 16,087 items restored successfully.
After reopening Codex Desktop, the previously missing history was visible again.
A subsequent restart preserved the restored history.
One smaller thread with a single duplicate ordinal was also repaired in
isolation by advancing only the byte offset past the redundant metadata record.
Important warning:
I would NOT recommend blindly deleting projection rows or replacing
thread_history_1.sqlite.
On Codex 0.153.1, both of those approaches failed to rebuild history and could
leave the thread with zero projected turns.
I also would not recommend blindly editing next_rollout_ordinal.
The recovery worked because the duplicate metadata records were first identified
and verified directly in the canonical rollout JSONL.
A supported Codex repair command would still be preferable.
Ideally the projector could detect this pattern:
ordinal N
redundant metadata ordinal N
next valid ordinal N+1
and safely skip/reconcile the redundant metadata record rather than permanently
stalling the paginated history projection.
matthudson commentedon Sep 5, 2026
Additional Windows reproduction with a complete durable rollout but a severely stale paginated history projection.
Environment:
26.901.5280.00.153.4Observed durable data:
350,050,667bytes37,962valid JSONL records37,959event_msg/token_countfollowed byevent_msg/task_startedwith the same ordinal; the following record is ordinal + 1Observed derived state:
68,484,479, next ordinal9,078281,566,188bytes2,641items /12turns materialized1,343projection rows found this as the only lagging projectionPRAGMA integrity_checkpassescodex doctor --jsonreports both state/history DB integrity and rollout parity as healthy, so it does not detect this failureThe log previously showed the projector reaching the second boundary (
expected ordinal 9457, got 9456). After a later desktop update/restart, the projection cursor regressed to the first boundary, even though the rollout remained unchanged. This makes a DB-cursor-only workaround non-durable across projection rebuilds.An isolated recovery test confirms the causal pattern: removing only the two duplicate
token_counttelemetry records (retaining bothtask_startedrecords and every content record) makes the ordinal stream contiguous, after which Codex's own app-server projects to exact EOF / next ordinal37,960and the history database remains integrity-clean.Suggested fixes:
task_startedafter interruption/resume instead of reusing the precedingtoken_countordinal.No transcript content is included here, but I can provide a small synthetic JSONL reproducer if useful.
matthudson commentedon Sep 5, 2026
Follow-up from the same Windows reproduction:
1,344projection rows matching1,344durable rollouts, with zero missing, lagging, or malformed rollouts.projected_offset == rollout_size(zero bytes behind), whilenext_ordinalwas already two behind the ordinal implied by the complete rollout.This suggests the UI can temporarily look recovered while the derived projection is already internally inconsistent again. Comparing only cursor byte offset to EOF is therefore insufficient; doctor/materializer validation should also compare
next_ordinalwith the durable record sequence and tolerate or normalize this exact non-content duplicate pattern.I have installed a local backup-first, fail-closed audit/repair button as a temporary workaround, but an in-product Rebuild task history index action would be much safer and more discoverable for affected users.
ThalamicBarrel commentedon Sep 5, 2026
Additional Windows case, diagnosed and recovered on 2026-09-05, with the affected user's explicit permission to submit this technical report. This adds evidence from desktop package
26.901.5280.0and, importantly, user-confirmed recovery in the desktop UI.Environment and scope
OpenAI.Codex 26.901.5280.0(ChatGPT.exe).codex-cli 0.153.4during diagnosis.0.153.1. This is not a claim that 0.153.4 originally wrote the duplicate.Verified failure
The saved rollout contained later work and its final assistant response /
task_complete, while the application returned an earlier turn as interrupted and omitted the later completed turn.The exact boundary was:
A full scan found exactly one ordinal discontinuity: the settings event above repeated the preceding ordinal. Subsequent records continued consecutively through ordinal 2451, including the final response and completion.
Warnings from
codex_thread_store::local::live_writeroccurred between 2026-09-05 01:34:43 and 01:47:47 UTC and ended with:The state and history databases passed
PRAGMA quick_check.Recovery performed and verified
This is an account of a guarded local workaround, not general advice to edit SQLite or a supported product fix.
next_rollout_byte_offsetfrom98299689to98301720, keepingnext_rollout_ordinal=2329. This bypassed the 2,031-byte duplicate settings event for projection only.98681704, next ordinal2452, consistent with final durable ordinal2451.A broader local inventory found 262 rollout files matching 262 registered sessions, no unregistered rollout files, and no other projection cursor behind EOF at the checked snapshot (excluding the actively writing diagnostic conversation). This is not a claim that every page of every conversation, or cloud history, was visually validated.
Remaining issue / requested maintainer guidance
The original duplicate record is preserved, so a future full projection rebuild could encounter the same boundary again. A successful local recovery is not a permanent fix.
Could maintainers confirm:
No conversation title or ID, prompts, transcript content, personal filesystem paths, credentials, raw logs, screenshots or database attachments are included. No in-app feedback upload is being claimed.
wcs891016-creator commentedon Sep 5, 2026
Justkant commentedon Sep 6, 2026
Also observed on Linux x86_64 with Codex CLI 0.153.4. Resuming a paginated conversation omits recent messages, while the original JSONL transcript contains them. Logs repeatedly report
thread history projection for <redacted-thread-id> expected ordinal 815, got 814. The projection remains behind the saved transcript. This suggests the issue is not limited to Windows. No database edits or repair attempts were made.huashengyou92 commentedon Sep 7, 2026
Additional macOS reproduction: projection checkpoint matches one duplicate metadata ordinal
Observed on 2026-09-07. This matches the failure signature in this issue, so I am adding a sanitized reproduction instead of opening a duplicate.
Environment
26.901.51231, build8109, bundle identifiercom.openai.codex.26.5.1, Apple Silicon / arm64.codex-cli 0.153.4.0.153.0-alpha.5.paginated.User-visible symptom
A long local task now appears to contain only its first two turns. Later discussions and completed work are still present in its original rollout. Re-reading via the desktop task-reading tool returns those same two turns with
nextCursor: nullandhasMore: false. The second turn is exposed asinterrupted; its stored projection row is stillinProgress. Desktop logs show successfulthread/read,thread/turns/list, andthread/items/listresponses, so callers receive an apparently successful but incomplete history.Read-only evidence
task_startedand 86task_completeevents.thread_history_projection_stateremains at:next_rollout_byte_offset = 2833133next_rollout_ordinal = 286PRAGMA quick_checkreturnsokfor bothstate_5.sqliteandthread_history_1.sqlite.Boundary, with all payload contents omitted:
event_msg/token_countevent_msg/thread_settings_appliedevent_msg/task_startedturn_contextThe stored byte checkpoint points exactly to the second ordinal-285 record. Later records continue through ordinal 4744.
The local runtime log contains repeated warnings from
codex_thread_store::local::live_writer:Source comparison and recovery question
Both the writer-version source and the installed-version source return an error when
ordinal < next_ordinal, matching this checkpoint and log error.I also found the merged fixes:
The checked
rust-v0.153.4projection code still has the strict rejection above, whereas current main includes the new duplicate/regressed-ordinal handling. Which released desktop/runtime build contains these changes, and should opening an already-wedged task in that build automatically advance its existing projection checkpoint?The duplicate boundary and resulting projection stall are directly observed. The original cause of duplicate assignment is not proven here: competing/stale writer state is one possibility; the tail-decoder/resume issue addressed in #42378 is another lead. This report does not claim a deterministic reproduction of the producer race.
No repair, cursor advance, rollout rewrite, or database edit has been performed. No transcript contents, task identifiers, credentials, account details, or private project paths are included.
jokrasno commentedon Sep 8, 2026
Additional Windows reproduction: mobile-visible truncation with exact duplicate ordinal boundary
Adding another independently verified case to this issue rather than opening a duplicate.
Environment
OpenAI.Codex 26.901.6511.026.901.51231codex-cli 0.153.0-alpha.5User-visible symptom
Opening this long-running Codex thread on mobile shows only a small portion of the conversation and makes much of the prior context unreachable. The local host transcript still contains the missing work. A desktop/API history read likewise exposes only two projected turns, even though the canonical rollout contains 14
task_startedand 12task_completeevents.The user associates the visible truncation with opening the thread on mobile. This report does not claim that mobile access created the durable defect; it may only expose an already-stalled projection.
Read-only structural evidence
Exact boundary, with payload contents omitted:
2026-09-08T01:03:00.404Zevent_msg / token_count2026-09-08T01:03:23.877Zevent_msg / thread_settings_applied2026-09-08T01:03:23.888Zevent_msg / task_startedThe two ordinal-921 records contain different metadata and should both be preserved.
Corroborating desktop logs
Five
thread/forkattempts failed with JSON-RPC-32603and the same internal error:The paired composer logs report
side chat failedwith the same message. Earlier retained desktop logs also contain threeConversation state not founderrors for this conversation, though their relationship to the duplicate ordinal is not established.Expected behavior
token_countordinal.No rollout, database, projection cursor, or application state was modified during this investigation. No task identifiers, absolute paths, prompts, source code, credentials, or raw logs are included.
XiaoYangyangs commentedon Sep 9, 2026
Additional recurrence report from another Windows installation: this has affected several separate paginated conversations, not just one transcript.
Environment observed on 2026-09-09:
Latest affected conversation, inspected read-only:
Two earlier independent cases on the same installation were tested in isolated database/rollout copies:
These isolated tests are recovery evidence, not claims of a supported repair or of a permanent fix. Simply reading paginated history did not advance the stalled projection in the tests; opening/resuming the isolated conversation did after cursor reconciliation. The writer-side trigger remains unproven; the repeated records occur at settings/resume boundaries.
User impact: later inputs and outputs appear to disappear when reopening conversations, while the durable records remain on disk. Per-conversation recovery does not prevent another conversation encountering the same failure. Please investigate both ordinal assignment and automatic projection recovery, and provide an actionable UI error or supported doctor command.
No conversation content, task IDs, project names, local paths, raw logs, credentials, or database files are included.
cis-aconiticacid commentedon Sep 9, 2026
Hi all, I think many of these bugs are structural consequences of Codex's thread-state design, where backend state, frontend state, resume/reopen, pagination, updates, cross-device/Remote Control, and compaction all maintain or reconstruct the same conversation through separate pathways, so if you have isolated a specific trigger or root cause, I recommand you to open a new separate issue
ibrahimo-ops commentedon Sep 9, 2026
Additional Windows reproduction: duplicate ordinal 23 blocks projection at byte 193367
Adding verified boundary evidence from another installation on package 26.901.6511.0. The
token_count/thread_settings_appliedpair matches the ordering pattern described in this issue. No repair was attempted in this case.Summary
An existing Codex Desktop conversation ("Thread B") has two consecutive valid JSON records with
ordinal: 23in its durable rollout. The history projector stops exactly at the second record, repeatedly reportingexpected ordinal 24, got 23. The derived history remains incomplete and shows staleinProgressmetadata while the runtime isidle.The source ordering defect and its relationship to the projection failure are directly verified. The component, version, and event that originally wrote the duplicate have not been identified.
Version / environment
10.0.26200.9445, x64.OpenAI.Codex_26.901.6511.0_x64__2p2nqsd0c76g0.26.901.51231(a separate version field).These are the versions present during diagnosis; they do not establish which version created the historical duplicate on September 5.
Observed evidence
At
2026-09-09T19:28:06.206845Z, the durable rollout was 57,494,219 bytes, while the projection checkpoint was:The records at this boundary were:
token_countthread_settings_appliedtask_startedThe first 26 records were valid, newline-terminated JSON. The next source record at the checkpoint therefore contains 23 when the projector correctly expects 24. Repeated projection warnings were observed on September 9 around 19:12-19:14 UTC. Only five projected items and stale
inProgressmetadata dating from September 5 remained in the derived history.A complete envelope/ordinal audit at
2026-09-09T19:32:55.460486Z, bounded by the initial file size, read all 3,121 records / 57,494,219 bytes. All records parsed successfully and had ordinals. Exactly one adjacent duplicate and one globally repeated ordinal were found; there were no forward gaps or regressions. Ordinals ran from 0 through 3119, with that one repetition.Repeated warnings therefore demonstrate retries at one historical defect, not repeated creation of new duplicate records.
Reproduction / limits
This is an observed persisted defect, not a deterministic clean-install reproduction. The 8-minute-38-second gap before
thread_settings_appliedsuggests investigating resume/append ordering, but does not prove a particular trigger or writer. Inspection was read-only; no history, checkpoints, settings, or caches were modified, and no repair has been validated.A separate existing-thread open/send stall before
thread/resumeoccurred in another conversation with a fully current projection and 762 valid records, ordinals 0-761, with no anomalies. This duplicate must not be treated as the demonstrated cause of that separate symptom.Expected behavior
Durable source ordinals should remain unique and sequential across append/resume. A malformed sequence should produce an actionable recovery path rather than indefinitely stale derived history.
Proposed investigation
Please investigate ordinal allocation/persistence around resume and the transition to
thread_settings_applied/task_started, plus supported recovery of this conversation's projection while preserving its durable history. A regression test using a synthetic duplicate-ordinal boundary may help verify detection and recovery. Raw conversations, screenshots, identifiers, and source-bundle excerpts are omitted from this public report.y1399789250-hue commentedon Sep 11, 2026
Additional Windows case on package 26.903.9818.0: duplicate ordinal 6195 at the stalled checkpoint
Adding sanitized evidence from a local desktop task inspected on September 11, 2026. The boundary matches the
token_count→thread_settings_appliedpattern in this issue.Environment
Microsoft Windows NT 10.0.26200.0.OpenAI.Codex 26.903.9818.0, verified withGet-AppxPackage. This is the package version at diagnosis, not proof of the writer version that created the duplicate.Observed symptom
The user reports that recent chat history appears to be missing. The app-provided
read_threadtool, called newest-first without a cursor, returns September 9 turns even though the original rollout contains later user/assistant messages through September 11. The UI complaint was user-reported; the stale history-tool result and local metadata were independently checked.Read-only evidence
Snapshot at
2026-09-11T05:16:31Z:thread_history_projection_state:next_rollout_byte_offset = 53943684,next_rollout_ordinal = 6196.inProgress, with no completion timestamp, dating from September 9.A subsequent targeted, read-only check confirmed this exact unchanged boundary:
event_msg / token_countevent_msg / thread_settings_appliedevent_msg / task_startedresponse_item / messageThe stored checkpoint expects 6196 but points to the second 6195 record. The two records have different event types; this is a duplicate ordinal, not a claim that the payloads are identical. Boundary timestamps are
2026-09-09T10:06:41.207Zand2026-09-09T10:09:59.228Z.Limits and requested recovery
The producer trigger and failing runtime code path remain unconfirmed; no corresponding projection-error log was established in this investigation. Multiple compactions exist in the transcript, but compaction has not been established as the cause.
No source rollout, history database, or projection cursor was edited. No cache reset, forced reindex, or app restart was tested as a repair. A new task plus a local handoff summary restored workflow continuity; it did not repair the old task's history.
Please provide a supported recovery path for already-affected tasks and an actionable warning when history projection is stale. No conversation text, project details, account identifiers, task IDs, credentials, raw logs, or private paths are included in this public comment.