macOS Desktop: orphaned turn hides later completed turns and falsely exhausts pagination
What version of the Codex App are you using (From “About Codex” dialog)?
- Codex Desktop:
26.818.61809(build7019) - Bundled Codex CLI/app-server:
0.149.0-alpha.4.3
What subscription do you have?
ChatGPT Pro
What platform is your computer?
Darwin 25.5.0 arm64 arm
What issue are you seeing?
A local Desktop thread has one old turn with task_started but no terminal event. All later turns in the same rollout have their own turn_id, items, and task_complete, but thread/read returns only the orphaned turn:
page.hasMore = false
page.nextCursor = null
turns = [old turn only]
old turn.status = interrupted
The later conversation is therefore absent from the Desktop transcript, even though the raw rollout is intact and parseable.
Observed on one local macOS thread:
- rollout: 24,457 JSONL records / 144.7 MB;
- 46
task_started, 45task_complete; - exactly one unmatched start;
- orphan turn starts at
2026-08-21T20:51:33.638Z, has 288item_completedrecords, and has no terminal event; - successor starts 100 seconds later, completes normally, and subsequent turns—including deployment and follow-up reports—also complete normally.
This is a history projection/read failure, not evidence of lost raw transcript data. The thread metadata points at the correct rollout and uses history_mode='paginated'.
What steps can reproduce the bug?
A minimal event fixture should be sufficient:
task_started(A)
item_completed(A)
# no task_complete(A): interruption/process loss
task_started(B)
item_completed(B)
task_complete(B)
task_started(C)
item_completed(C)
task_complete(C)
Then read the thread through Desktop or app-server thread/read.
On the affected real thread, B/C and many later turns are omitted even though their item_completed and task_complete payloads carry the correct distinct turn_id values.
What is the expected behavior?
- B and C must remain separate completed turns, newest first.
- A may be represented as interrupted/incomplete, or implicitly closed when B starts.
- A must not absorb or hide B/C items.
hasMoreandnextCursormust reflect the actual indexed turn count.- Existing normal completed and currently active threads must continue to render normally.
Additional information
A likely fix is to group persisted items by explicit payload.turn_id rather than a prior open-turn accumulator, and to close/mark an older open turn interrupted when a newer task_started arrives. A rebuild of the affected paginated projection may also be required.
This is related to #37577 (paginated history reconstructing turns as interrupted), but differs in the deterministic failure mode: an orphaned earlier turn acts as a barrier that hides later independently completed turns and falsely reports pagination exhaustion.
I have not attached the full rollout because it contains private prompts, paths, and tool output. I can provide a sanitized event trace or fixture privately if useful.
1 Comment
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action