Repository navigation
Description
What version of the Codex App are you using?
- Codex Desktop:
26.818.32112 - CFBundleVersion:
6933
What platform is your computer?
- macOS
26.3.2(build25D2140) - Apple Silicon (
arm64)
What issue are you seeing?
A long-running Codex Desktop thread contains one orphaned historical turn whose tool work finished, but whose terminal lifecycle event was never persisted.
The affected turn remains:
status: inProgress
completedAt: null
The app subsequently accepted many new user turns in the same thread. Those later turns produced normal assistant final messages and matching completion events, and they remain present in the local rollout JSONL. However, the Desktop UI and thread reader continue to give precedence to the older orphaned turn, so the visible conversation is truncated at that Friday turn and the completed Saturday/Sunday conversation is hidden.
Restarting Codex does not repair the state. The underlying conversation data is not deleted; thread reconstruction is blocked by the stale orphaned turn.
No host reboot, deliberate app termination, or destructive command was observed at the boundary where this occurred.
Diagnostic evidence
The local append-only rollout contains this sequence:
task_startedfor the affected turn.- Normal assistant commentary and multiple command/tool events.
- The final visible tool event is marked completed.
- No matching
task_complete,turn_aborted, final assistant message, failure event, or cancellation event is present for that turn. - The very next rollout ordinal starts another task.
- Many subsequent turns contain valid final assistant messages and
task_completeevents. - After multiple app restarts, thread inspection still returns the old orphaned turn as
inProgresswithcompletedAt=null, ahead of the later completed history.
For the affected rollout, a lifecycle audit found:
- 39
task_startedevents - 35
task_completeevents - 2 valid
turn_abortedevents - 1 historical orphaned turn
- 1 currently active turn at the time of inspection
The exact local thread/turn UUIDs, repository path, task contents, and rollout file path are intentionally omitted from this public report. They remain available locally if a private diagnostic channel is provided.
Steps to reproduce the bug
A deterministic trigger is not yet known, but the observed sequence was:
- Use a long-running Codex Desktop project thread on macOS.
- Run a turn containing several normal tool/command operations.
- The last tool operation completes successfully.
- The turn fails to emit/persist any terminal lifecycle event.
- Continue the same thread with additional user messages.
- Observe that later turns can execute and complete normally.
- Restart Codex and reopen the thread.
- Observe that the timeline remains truncated at the old
inProgressturn and later completed turns are not displayed.
Expected behavior
Codex should enforce and recover the turn lifecycle invariant:
- Every accepted
task_startedevent must eventually have exactly one terminal event: completed, failed, cancelled, interrupted, or aborted. - Before accepting a new turn, any prior active turn in the same thread should be terminalized or explicitly superseded.
- On startup, the app should reconcile orphaned turns left by process interruption or event-write failure.
- A historical orphaned turn must not hide later authoritative rollout events and completed turns.
- The UI should expose a safe force-stop/reconcile action when no live backend execution is attached to an
inProgressrecord.
Workaround
A new recovery thread was created from the same working-tree state with a complete context handoff. This restores work continuity but does not repair the original thread or make the hidden completed turns visible there.
Related issues
This appears closely related to #41475, which reports later durable messages being truncated behind an orphaned turn after a Windows reboot. The important difference here is that this occurred on macOS without an observed host reboot, and the orphaned turn's last tool call had already completed normally.
It is also related to #29901 and #28499, but this report includes direct rollout evidence that later turns completed normally and are specifically hidden by one older missing terminal event.
Activity
github-actions commentedon Aug 30, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Jackeyhate9 commentedon Aug 31, 2026
I can confirm a closely related occurrence on Windows Codex Desktop.
Environment
OpenAI.Codex_26.825.6671.0_x64151.0.7922.1740.151.0-alpha.7.210.0.26200.0x64Observed behavior
The Desktop UI displays only part of a long conversation even though the missing work and a final answer are still present in the thread data and the resulting Git history/files.
For the affected thread,
thread/readreports the following lifecycle state (local thread and turn UUIDs omitted):However, that same persisted turn contains a normal assistant
final_answerstating that the task completed, along with completed command/tool events and evidence that the output was committed and pushed. The app later accepted additional user messages, but reopening/reading the task presents an incomplete transcript and continues to treat the historical turn as active.The history also contains preceding failed turns associated with usage-limit /
429 Too Many Requestserrors. I cannot prove that those errors caused the orphaned lifecycle state, but they occurred in the affected long-running thread.Expected behavior
If a persisted turn contains a terminal assistant response or the runtime has moved on to later input, Desktop/app-server should reconcile the stale
inProgressrow, or at least retain and render all later transcript records.hasMore: falseshould not be returned while valid conversation content is hidden.No thread/turn UUIDs, raw prompts, project source, credentials, screenshots, or local filesystem paths are included here. Private identifiers can be supplied through an official private diagnostic channel if needed.
lorianlee98-spec commentedon Aug 31, 2026
I traced a matching local occurrence through the rollout JSONL, the paginated SQLite projection, and the app-server response path. The rollout ordinals were contiguous and later completed turns were present in both durable sources, so this was not transcript loss or the duplicate-ordinal failure from #41566.
The app-server root cause is status normalization:
set_thread_status_and_interrupt_stale_turnsandnormalize_thread_turns_statusreceive only a thread-widehas_live_in_progress_turnboolean. When a later turn is genuinely running, that boolean causes every historical projectedinProgressturn to remaininProgress, including an orphan left by an earlier restart.thread/readandthread/turns/listcan therefore expose more than one active-looking turn, and clients may reconstruct from the stale one.I added a production-shaped regression that persists orphan A in paginated history, restarts app-server, starts live B, then reads both JSON-RPC surfaces. Before the fix, A and B are both
inProgress; after the fix, B is the uniqueinProgressturn and A isinterrupted, with both turns still present.Minimal fix and test: lorianlee98-spec@50228b1
Verification:
just test -p codex-app-server live_paginated_turn_is_the_only_turn_reported_in_progress -- --nocapture: passjust test -p codex-app-server suite::v2::thread_read::: 21/21 passcodex,codex-code-mode-host, ortest_stdio_serverbinaries remain environmental failuresCurrent
docs/contributing.mdsays external code PRs are not accepted, so I have not opened an unsolicited upstream PR. If a maintainer wants this submitted as an invited PR, I can open it and complete the CLA step immediately.Mitch-TokamaX commentedon Sep 4, 2026
I can confirm this exact failure is still occurring on Windows, including when the affected thread is reopened with a newer Desktop build.
Environment
OpenAI.Codex_26.901.1978.0_x64152.0.7977.640.153.0-alpha.50.151.0-alpha.7.2Observed incident
On September 4, 2026, a full day of previously visible user/assistant exchanges disappeared from the Desktop UI after reopening a long-running task. The content was not deleted: the append-only rollout JSONL was still current and a bounded local recovery extracted 110 user-visible message records from the affected day (16 user, 94 assistant).
Current
thread/readstill reports:The orphaned turn started on September 3 and remains the first turn returned by the reader, although many later user messages, assistant finals, and completed tool operations are durable in the rollout. Restarting Desktop did not reconcile it. The affected rollout is approximately 512 MB, so this also exercises the paginated history path at substantial scale.
Impact
This presents as catastrophic data loss to the user: a complete day of architecture decisions and implementation work becomes inaccessible in the UI even though the records still exist locally. Manual JSONL recovery was required to continue safely.
Expected behavior
inProgressturn must never hide later authoritative records.No transcript, prompts, project names, source code, credentials, local paths, or session UUIDs are posted publicly. Exact identifiers and a redacted lifecycle extract can be provided through an official private diagnostic channel.
This Windows occurrence strongly supports the root-cause analysis already posted above and shows the bug remains user-visible on Desktop
26.901.1978.0.giancarloerra commentedon Sep 5, 2026
I can confirm the exact same problem, long conversations not very well managed
memphoid53 commentedon Sep 5, 2026
Public GitHub follow-up for #41591
I can confirm this is still recurring on macOS, and I now have a strong reproduction involving a normal, user-initiated Quit rather than a crash or forced termination.
Environment
26.901.411237942Scope and impact
Across September 2–5, local lifecycle audits found 45 previously orphaned turns that required repair. A subsequent normal Quit produced 2 additional affected turns in the same shutdown, bringing the observed total to 47 turns.
The failures occurred across many unrelated tasks rather than one damaged conversation. The recurring database state was:
In the most damaging occurrence, the durable rollout retained later user messages, assistant work, and 17 later completed turns, but the SQLite projection stopped at the older unterminated turn. The Desktop UI consequently showed old content and the task appeared unable to respond. The conversation data was not deleted; it was hidden by stale lifecycle/projection state.
Confirmed graceful-Quit sequence
Two tasks were actively running when I selected the app's normal Quit command. The app did not crash and was not force-quit.
The sanitized Desktop log records normal teardown at approximately
2026-09-05T13:10:40Z, including:After relaunch, both active turns lacked a durable terminal lifecycle event. For one of them, the rollout later reused an ordinal, producing one duplicate/non-monotonic pair. Many later turns nevertheless ran to completion and remained in the append-only rollout.
On startup/resume, the app log later reported the stale latest turn as interrupted in memory:
However, that reconciliation was not persisted to the local turn record or used to rebuild the complete projection. The row remained
inProgresswithcompletedAt=null, and later completed history remained invisible.The second task showed the same missing terminal event after Quit. A later turn completed normally, but the older turn still remained unterminated in storage.
Expected behavior
inProgressturns tointerruptedand persist a corresponding terminal lifecycle event.Recovery evidence
The affected histories were recoverable because the raw rollout data remained intact. A local repair that backed up the history, inserted an interruption boundary where appropriate, normalized ordinals, removed stale projection rows, and allowed the app to rebuild restored the hidden history.
This appears to add a deterministic trigger and recurrence evidence to #41591: graceful Desktop shutdown can create the orphan, and startup can recognize
interruptedwithout durably repairing the record or projection. It is also related to #41475, but no host reboot occurred here.No prompts, transcript content, project names, usernames, local paths, task UUIDs, or turn UUIDs are included publicly. Exact identifiers and redacted lifecycle extracts are available through a private OpenAI diagnostic channel.
kevinmarty69 commentedon Sep 10, 2026
I'm seeing similar symptoms on macOS. Recent completed messages are present in the local rollout JSONL (including assistant final messages and task completion events), but missing from both the Desktop UI and
read_thread. The displayed history stops at an older turn markedinProgresswithcompletedAt: null.Fully quitting and reopening Codex didn't help. I haven't confirmed whether the underlying cause is the same as in this issue.
memphoid53 commentedon Sep 10, 2026
PengSafari commentedon Sep 10, 2026
I am reporting another macOS occurrence on September 9–10, 2026, with a read-only lifecycle audit that closely matches this issue.
Environment
26.901.51231, build8109(from Info.plist).com.openai.codex; installed bundle display name:ChatGPT.codex-cli 0.153.4.26.6.2, Apple Silicon;uname -mprs:Darwin 25.6.0 arm64 arm.Observed mismatch
The user saw later replies/history disappear on September 9 and again on September 10. The original session JSONL still contains the missing assistant final messages, including the previous day's substantive final answer and a recently completed short reply.
The desktop
mcp__codex_app__read_threadtool was repeatedly requested withturnLimit: 6. It consistently returned only the earliest turn from September 8:{ "page": { "order": "newest_first", "limit": 6, "nextCursor": null, "hasMore": false }, "turns": [ { "status": "inProgress", "completedAt": null, "itemCount": 26 } ] }The 26 items are all from the beginning of the conversation. This is the desktop tool's response, not a direct capture of the underlying app-server JSON-RPC response.
Additional lifecycle evidence
A scan of the original rollout, matching lifecycle events by
turn_id, found two historicaltask_startedentries with no matchingtask_completeorturn_abortedevent. These are separate from the currently active diagnostic turn.inProgressturn returned by the reader.task_completeevents remain present.compactedrecords; the file has continued growing during diagnosis.thread/read,thread/turns/list, andthread/items/listwitherrorCode=null.The source rollout was not edited. Missing messages were recovered into a separate readable local transcript. We have not established a deterministic trigger, tested restart as a recovery step for this occurrence, or verified whether the proposed status-normalization fix addresses it. We also have not inspected the SQLite projection or proven an ordinal/decoder fault.
This adds an occurrence on Desktop build
8109/ runtime0.153.4, where the newest-first reader returns only the first unterminated turn withhasMore: falsedespite later durable completed turns. Please advise on a supported recovery/reindex procedure or a release that addresses this specific state.No conversation text, raw logs, local usernames/paths, or session/turn IDs are attached publicly.
memphoid53 commentedon Sep 16, 2026
Continuing macOS recurrence: 71 affected turns across 33 task records
This is a consolidated follow-up to my September 5 report. The orphaned-turn / stale-projection failure continues to occur essentially daily and persists after updating the ChatGPT/Codex Desktop app.
Current environment
26.908.708169275Complete observed scope
I now have durable evidence for 71 affected turns across 33 distinct task records:
Fifteen timestamped repair backups independently preserve the pre-repair SQLite database, affected rollout files, and a manifest of the repaired task/turn inventory. Those manifests account for 64 turns. Two additional turns were repaired with guarded SQLite updates after separate backups. The latest read-only audit found five more confirmed historical stale turns that have not yet been repaired.
Latest audit
The latest audit covered 103 rollout files: 72 primary-task transcripts and 31 worker/subtask transcripts. The history database passed
PRAGMA quick_check.Five historical turns in three primary tasks had all of the following:
Two affected tasks were actively running newer turns during the audit. The scanner deliberately treated only each task's newest turn as live, yet found two older unclosed turns in one active task and one older unclosed turn in another. A third, currently idle task had two unclosed historical turns. This demonstrates that the problem is not merely a sidebar status artifact: multiple historical turns remain
inProgresswhile later/current work proceeds.Recurring user-visible symptoms
thread/reador the Desktop UI can stop at an olderinProgressturn and omit later completed work.interruptedin memory, but do not persist completion metadata or rebuild the projection.Observed triggers and correlations
A normal, user-initiated Quit remains a confirmed trigger: the app logged orderly app-server shutdown (
Stopping app-server transport, thencause=stop_process), but active turns were not durably terminalized before shutdown.I have also repeatedly seen response-stream failures of the form:
Network loss, hotspot/Wi-Fi transitions, using Remote from a phone, and stopping or quitting while work is active appear correlated with additional occurrences. I cannot prove that every websocket failure creates an orphan, but the lifecycle damage frequently appears around interrupted/disconnected work.
The latest five failures were found after earlier same-day repairs had verified clean, which means the defect is actively recurring rather than being old accumulated damage.
Recovery required today
The only reliable recovery has been an unsupported local procedure:
turn_abortedlifecycle event for each genuinely dangling turn.This restores hidden history because the later rollout data is usually intact. It is nevertheless risky, disruptive, and unreasonable to require multiple times per day.
Requested product behavior
inProgressrows tointerrupted, includingcompletedAtanddurationMs, and persist the matching lifecycle event.inProgressturn followed by a newer turn must be reconciled automatically.This is no longer an isolated corrupt conversation. It is a recurring cross-task lifecycle/database consistency failure that has required 71 repairs in two weeks, including new failures on the current Desktop build. Exact task/turn identifiers and the timestamped backup manifests are retained privately and can be supplied through an official private diagnostic channel.
memphoid53 commentedon Sep 16, 2026
New recurrence after successful repair — September 16, 2026
Two new historical primary-task turns became orphaned within roughly two hours of a successfully applied morning repair. This is in addition to the 71 affected turns documented in the cumulative report, bringing my observed total to 73.
At the 09:23 PDT read-only check, both new turns still had
status=inProgress,completed_at=NULL, andduration_ms=NULLin the local history database. Each had atask_startedevent but no matchingtask_completeorturn_abortedin its rollout. Both tasks had already proceeded to newer turns, so these were not the currently running turns. The database integrity check wasok; the defect is lifecycle/projection consistency, not general SQLite corruption.The prior five-turn repair was independently verified: each target rollout now has exactly one interrupted terminal event, and four rebuilt projection rows show complete interrupted metadata. The fifth affected task's projection had not yet been re-created because that task had not been reopened. A fresh full scan found no malformed JSON lines or ordinal-ordering errors. These two new orphans therefore appeared after the prior repair, rather than surviving it.
Current Desktop build:
26.908.70816(9275) on macOS / Apple Silicon. I have not established what triggered these two specific occurrences, so I am not attributing them to Quit or websocket disconnects. The repeated post-repair recurrence further supports automatic stale-turn reconciliation and a supported integrity/reindex action.No transcript content, task/project names, identifiers, local paths, usernames, or raw logs are included publicly. Exact identifiers are retained locally for private diagnostics.
memphoid53 commentedon Sep 18, 2026
New recurrence found by the September 18, 2026 local audit
At 2026-09-18 03:05 PDT, a read-only sweep found three newly confirmed historical primary-task turn defects on macOS ChatGPT/Codex Desktop build
26.911.61220(Codex runtime0.154.0-alpha.6.2). Two turns have a persisted start but no terminal event, while later turns in the same tasks completed; their SQLite rows remaininProgresswith null completion metadata. A third turn has a persistedturn_abortedevent, but that event lacks completion metadata and its SQLite row remains incomplete. The database integrity check passed and no malformed rollout lines or ordinal errors were found in this audit.No new user-visible symptom was independently confirmed for these three turns; this is the same persistent-history defect class that previously produced stale task views and manual repair work. The two earlier unresolved turns remain unrepaired locally, but are not counted as new or re-reported here.
This extends my cumulative history and September 16 recurrence. The confirmed local total documented through these follow-ups is now at least 76 affected turns. I have prepared a guarded local repair but have not run it; this comment is a product defect report, not a claim about root cause.
memphoid53 commentedon Sep 21, 2026
New recurrence found by the September 21, 2026 local audit
At 2026-09-21 05:27 PDT, a read-only system-wide audit found one new historical primary-task turn defect on macOS ChatGPT/Codex Desktop
26.915.31945(build9922).turn_abortedevent included the interruption reason and start time but omitted both completion time and duration. Its SQLite projection likewise remainedinterruptedwith null completion metadata.This is a distinct recurrence after the cumulative 71-turn report and the September 18 follow-up. The audit has prepared, but not applied, a narrowly scoped local repair that completes the interrupted terminal metadata at its persisted boundary and rebuilds only the affected projection.
The observation is factual; the underlying cause remains unconfirmed.
memphoid53 commentedon Sep 24, 2026
New recurrence found by the September 24, 2026 local audit
At 2026-09-24 03:00 PDT, a read-only local audit found one new historical primary-task turn defect on macOS ChatGPT/Codex Desktop
26.917.62051(build10789).turn_abortedevent records an interruption reason and start time but omits both completion time and duration. Its SQLite projection is likewiseinterruptedwith null completion metadata.This is a new recurrence after the September 21 follow-up and the cumulative report. The cause remains unconfirmed. No task names, identifiers, prompts, transcript content, local paths, usernames, or raw logs are included publicly.
memphoid53 commentedon Oct 12, 2026
New recurrence found by the October 12, 2026 local audit
At 2026-10-12 00:56 PDT, a read-only local audit found one new historical primary-task turn defect on macOS ChatGPT/Codex Desktop.
task_startedevent has no matchingtask_completeorturn_aborted. Its SQLite projection remainsinProgresswith null completion metadata.This extends the cumulative report and the September 24 follow-up. The local repair is prepared but has not been applied. This observation does not establish the underlying cause.
No task names, identifiers, prompts, transcript content, local paths, usernames, or raw logs are included publicly.
claell commentedon Nov 11, 2026
I saw a related symptom in Codex Desktop on Windows x64. I applied an update while a chat with an active goal was running and confirmed the interruption warning. After the app restarted, the chat resumed automatically. The earlier turn's elapsed timer kept ticking in the conversation even though newer turns were visible and had already finished.
The matching local history shows a
task_startedwith notask_completeorturn_abortedfor that turn ID. Windows registered Codex package26.1103.4239.0between that start and the nexttask_startedfor a different turn ID in the same chat, roughly one minute before the newer turn began. By the time I checked, 14 later turns had a savedtask_complete. The installed package at inspection was26.1103.7773.0.The pre-update timer should stop once the interrupted turn is superseded by the resumed turn. Whether the old timer also ticks while the chat is idle, or whether an active goal is required to trigger this, remains unverified.