Codex Desktop exposes stale ghost conversations that cannot be resumed or archived
Summary
Codex Desktop can expose stale/ghost conversation IDs in the UI/recent-tasks path. These IDs are not present in the local thread index, so opening them repeatedly fails with no rollout found for thread id .... Attempting to archive one of these stale entries also fails, so the user cannot clear the broken item from the app UI.
This appears distinct from a shell snapshot validation issue I filed separately in #29864.
Environment
- Codex Desktop:
26.616.81150(CFBundleVersion4306) - Bundled CLI:
codex-cli 0.142.0 - macOS:
26.4(25E246) - Darwin:
25.4.0 arm64
Symptoms
Multiple conversations shown/accessible from the Desktop UI fail to restore. The app-server/local thread tools do not know about these IDs, but the renderer still attempts to read/resume/archive them.
Representative sanitized log snippets:
method=thread/resume conversationId=019ef957-...-0e6 errorCode=-32600
Request failed ... error={"code":-32600,"message":"no rollout found for thread id 019ef957-..."}
Failed to resume conversation ... errorMessage="no rollout found for thread id 019ef957-..."
method=thread/archive conversationId=019ef956-...-5e4 errorCode=-32600
Archive skipped because thread has no active rollout ... "no rollout found for thread id 019ef956-..."
Failed to persist inactive thread archive ... "Inactive thread archive did not persist"
No cwd found for local task conversationId=019ef956-...
No cwd found for local task conversationId=019ef957-...
Local validation
I checked the local state and the issue does not look like general thread database corruption:
sqlite3 ~/.codex/state_5.sqlite 'pragma quick_check;' => ok
threads_total=663
unarchived=31
missing_unarchived_cwd_or_rollout=0
The ghost IDs are absent from the thread DB:
019ef957-...-0e6 => 0 rows in threads
019ef956-...-5e4 => 0 rows in threads
019efa16-...-d7a => 0 rows in threads
019ef961-...-7cf => 0 rows in threads
019ef955-...-0ce => 0 rows in threads
019efa13-...-62d => 0 rows in threads
The same IDs also do not appear in codex_app.list_threads(query=...), and codex_app.read_thread(threadId=...) reports no Codex thread found. By contrast, real notLoaded threads with valid DB rows and rollout files are readable.
Expected behavior
- Desktop should not present non-existent local conversation IDs as restorable conversations.
- If a stale recent-task/sidebar entry exists but the thread has no rollout, archive/remove should still be able to clear the stale UI entry.
thread/resumefailure for a missing rollout should not trap the user in a repeated unopenable item.
Workarounds tried
- Verified all unarchived real threads have existing cwd and rollout files.
- Cleared/recreated
~/.codex/shell_snapshots; this fixed a separate resume failure for one older real thread, but not these ghost IDs. - Moved Electron/Chromium cache directories aside and recreated empty cache directories. After that, no new
no rollout founderrors appeared until another UI open attempt, but the source of the stale IDs was not found in common local text-searchable storage.
Why this matters
From a user's perspective, this looks like "many sessions won't open" and invites over-archiving or deleting local data. In this case, archiving more real threads is not the root fix: the broken IDs are not real threads in the state DB at all.
5 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I can reproduce the same ghost-conversation/archive failure on Linux.
Environment:
26.616.81150codex-cli 0.142.242.1.0Failing conversation id:
Observed log signature in
~/.cache/codex-desktop/launcher.log:Local validation:
There is a nearby real thread prefix (
019f033c-2510-...) instate_5.sqlite, but the exact failing id has no backing thread row or rollout. The interesting part in this reproduction is that the stale id appears to come through the browser/IAB sidebar route, then the UI/recent-tasks path treats it as a normal archiveable/resumable conversation.Expected behavior: if the app knows a route is ephemeral/browser-sidebar-backed, or if
thread/resumereturnsno rollout foundplusthread/goal/getreturnsephemeral thread does not support goals, the recent/sidebar entry should be locally removable without sending a normalthread/archiverequest that requires a rollout.I can still reproduce this on Linux, and it appears to be the same failure family as #28276.
Environment:
26.623.10165242.1.00.142.57.0.12-1-cachyos, WaylandRepro notes:
Smoke test result:
019f397a-a6f3-7393-94bd-6a32765e6429019f397a-aa99-77b2-92e3-08a03db8f939The ghost id produced a
New chat/ turn-complete UI artifact even though it has no backing thread row, session index entry, or rollout file.Relevant log sequence from
~/.local/state/codex/logs/2026/07/06/codex-desktop-154c1f8a-0d57-4140-b316-de978556e32b-448771-t0-i1-220817-0.log:Backing-store checks for the ghost id:
For comparison, the real smoke thread persisted normally:
What looks wrong to me:
turn/startedfor the ghost id is skipped as ambiguous, butturn/completedlater hydrates that same id anyway.thread/readreturns successfully for the ghost id, but Desktop then logsNo turns for conversation.Follow-up after updating Codex Desktop today: the visible ghost
New chatissue no longer reproduces for me in a fresh smoke test.Environment now:
26.623.14153642.1.00.142.57.0.12-1-cachyos, WaylandSmoke test:
019f3e5e-6a8d-7282-8b47-bc1d02d065a7state_5.sqliteandsession_index.jsonl.~/.codex/archived_sessions/rollout-2026-07-07T21-56-42-019f3e5e-6a8d-7282-8b47-bc1d02d065a7.jsonlCompared with my previous repro on
26.623.101652, I no longer see the failure chain:I did still see a residual unknown-conversation pair for a nearby id:
But that id did not persist and did not appear to cause the user-visible bug:
So from my side this looks materially improved/fixed for the visible ghost-sidebar behavior after
26.623.141536, with a possible remaining lower-level unknown-turn event still present in logs.I can reproduce this failure family in Codex Desktop 26.715.72359 on macOS, with a more specific source for the ghost entry: an ephemeral ambient-suggestions session leaked into the normal task sidebar.
Reproduction / evidence
lstoragehub.no rollout found for thread id 019f8da7-0900-7e20-ac2a-a9cacf1a7144.Expected
Ephemeral ambient-suggestions sessions should never appear as normal resumable tasks. If interrupted, their sidebar state should be removed even though no rollout exists.
Actual
The ephemeral session remains visible as a normal ‘New Task’; selecting it takes the normal resume path and fails because there is intentionally no rollout.
I also captured a screenshot of the Chinese UI; the second spinner row is the ghost task. No connected-app content is included in this report.