You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Codex desktop is showing stale/orphaned thread entries that cannot be reopened or archived. #14162
What version of the Codex App are you using (From “About Codex” dialog)?
Version 26.305.950 (863)
What subscription do you have?
Pro
What platform is your computer?
Darwin 25.2.0 arm64 arm
What issue are you seeing?
Codex desktop is showing stale/orphaned thread entries that cannot be reopened or archived. For thread IDs 019ccff2-7936-74e2-b59d-f678c2860b10 and 019ccf94-8e1d-72b2-a061-72bc1db23b15, the UI still surfaces them, but the local thread store has no matching rollout/thread record. For 019ccff2-7936-74e2-b59d-f678c2860b10, the app log shows thread/resume failing with no rollout found for thread id ....
Repro is not fully deterministic yet, but the broken state is reproducible once a stale/orphaned thread entry exists in the desktop UI.
Observed repro path:
Open Codex desktop and navigate to a thread entry that is still shown in the sidebar/list.
Click the thread to reopen it.
Codex attempts thread/resume, but the backing rollout/thread metadata is missing locally.
The thread cannot be opened, and it also cannot be archived/cleaned up from the UI.
Observed error: no rollout found for thread id <thread_id>
What is the expected behavior?
If a thread no longer has backing metadata, Codex should either hide it automatically or provide a working cleanup/remove/archive path instead of leaving a broken UI entry.
By any chance, did you manually delete the rollout files for these threads? Codex maintains a sqlite db for fast lookup of thread metadata and enumeration. It sounds like it may be out of sync with the rollout files.
Yes, I frequently request codex to find stale worktrees/branches and prune them and I saw Codex reading sqlite db. It seems likely that some files were deleted in the process.
Yeah, that would explain it. Try renaming the sqlite db (~/.codex/sqlite/codex-dev.db), then relaunch Codex. It should rebuild the db based on the on-disk rollouts that it finds.
By any chance, did you manually delete the rollout files for these threads? Codex maintains a sqlite db for fast lookup of thread metadata and enumeration. It sounds like it may be out of sync with the rollout files.
I usually tell codex to manage worktrees via cli itself and spawn sub-agents assigning them a worktree/branch pair, could this be why im hitting my related bug?
I hit what looks like the same underlying thread/rollout failure on Windows 11 with a WSL-opened repo.
Observed error: no rollout found for thread
My additional context:
• this happened while creating/running an automation in a WSL-opened Git repo
• normal local threads worked and returned the correct cwd
• the failing automation/thread path flashed the error and did not recover
• session ID from in-app feedback: 13cb61d3-2d73-46b4-9120-19248ea0665d
I originally filed this separately, but my issue was closed as overlapping with existing reports, so adding this here as another Windows + WSL datapoint.
I can reproduce a closely related failure on Windows + WSL in the Codex desktop app, specifically with Automations.
Current behavior on my machine:
Creating/running an automation fails with:
Failed to resume thread
no rollout found for thread id 019d559f-78e8-72c0-8e00-949fdae17bb4
This is not just a stale old thread in the sidebar. The failing thread id is created as part of the automation run path.
After the failure, the same dead thread id keeps getting retried.
Local evidence:
~/.codex/sqlite/codex-dev.db gets an automation_runs row for that thread id with status IN_PROGRESS.
~/.codex/state_5.sqlite has no matching row in threads for that same id.
~/.codex/sessions/... has no rollout file for that exact thread id.
So the automation run bookkeeping is persisted, but the backing resumable thread/rollout is never persisted.
Extra notes:
I am on the latest Codex desktop build as of 2026-04-04.
WSL prerequisites do exist on this machine: the automation cwd exists, the python3, node, git, and bash are present in WSL.
Deleting the orphaned automation_runs row alone did not fix it permanently. The app still tried to reopen the same dead thread from cached state.
This looks like the same underlying orphaned-thread / missing-rollout class, but via Automations on Windows+WSL rather than only normal thread resume.
Additional evidence for the same orphaned-entry failure on Linux with CLI/TUI and persistent app-server 0.154.0:
An empty ordinary session was started and then shut down without ever running a turn. The overview retained its row. codex archive <id> returned only Error: failed to archive session; the underlying thread/archive response was -32600: no rollout found for thread id <id>. thread/read returned thread not loaded. Read-only inspection confirmed no state row, rollout, turn history, or pending input for that empty session. Lifecycle logs showed the empty session's start and idle shutdown.
track_agents_overview_notification retains overview membership: ThreadClosed changes status to NotLoaded, while only ThreadArchived/ThreadDeleted removes the row. Failed metadata reads log a warning without evicting the stale membership.
archive_thread_with_paths requires resolve_current to return a rollout, so archiving cannot produce the notification that would remove this row.
Suggested regression case: start a non-ephemeral empty thread while another TUI observes the overview; close/unload it before the first persisted user turn; then archive its retained overview entry. The UI should provide a working cleanup path for a confirmed non-persisted closed session, without treating ordinary transient read failures as permission to remove valid sessions.
No private session identifiers, paths, prompts, or raw logs are included here.
Adding a macOS reproduction with a known deletion path:
ChatGPT/Codex desktop: 26.908.40834
Codex CLI used for deletion: 0.153.4
Observed sequence
Leave the desktop app running with existing local tasks visible in a project sidebar.
Delete specific saved tasks using the supported CLI command:
codex delete --force <task-uuid>
The CLI reports Deleted session <task-uuid>.
Read-only checks confirm the deleted task IDs are absent from the threads table in state_5.sqlite and their recorded rollout files are gone. The set of removed top-level IDs matches exactly the requested deletions; other task records remain.
Desktop still displays the deleted tasks in the project sidebar.
Clicking one of the stale rows displays:
Failed to resume chat
no rollout found for thread id <task-uuid>
The missing rollout is expected after successful deletion. The problem is that desktop continues presenting the deleted task as available to open.
Unlike the earlier manually deleted rollout-file scenario discussed above, these deletions were performed with codex delete, and both the task record and rollout were removed. No manual database mutation or rollout-file deletion was used.
Expected behavior
The desktop task list should reconcile deletions made through the supported CLI and remove the stale rows. If a user clicks an entry already confirmed deleted, the app should refresh/remove it and explain that it was deleted rather than repeatedly attempting to resume a nonexistent rollout.
Confirmed: fully quitting and relaunching the desktop app did not clear the stale sidebar entries. They remain visible after a full restart. The internal persistence/cache/notification cause is not established.
No screenshots, task titles, real task IDs, project names, account details, or raw logs are included.
Activity
github-actions commentedon Mar 10, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
etraut-openai commentedon Mar 10, 2026
By any chance, did you manually delete the rollout files for these threads? Codex maintains a sqlite db for fast lookup of thread metadata and enumeration. It sounds like it may be out of sync with the rollout files.
cheulyop commentedon Mar 10, 2026
Yes, I frequently request codex to find stale worktrees/branches and prune them and I saw Codex reading sqlite db. It seems likely that some files were deleted in the process.
etraut-openai commentedon Mar 10, 2026
Yeah, that would explain it. Try renaming the sqlite db (
~/.codex/sqlite/codex-dev.db), then relaunch Codex. It should rebuild the db based on the on-disk rollouts that it finds.agustif commentedon Mar 10, 2026
I usually tell codex to manage worktrees via cli itself and spawn sub-agents assigning them a worktree/branch pair, could this be why im hitting my related bug?
michaelpearce90 commentedon Mar 26, 2026
I hit what looks like the same underlying thread/rollout failure on Windows 11 with a WSL-opened repo.
Observed error:
no rollout found for threadMy additional context:
• this happened while creating/running an automation in a WSL-opened Git repo
• normal local threads worked and returned the correct cwd
• the failing automation/thread path flashed the error and did not recover
• session ID from in-app feedback:
13cb61d3-2d73-46b4-9120-19248ea0665dI originally filed this separately, but my issue was closed as overlapping with existing reports, so adding this here as another Windows + WSL datapoint.
klawdius-noodle commentedon Apr 3, 2026
I can reproduce a closely related failure on Windows + WSL in the Codex desktop app, specifically with Automations.
Current behavior on my machine:
Failed to resume threadno rollout found for thread id 019d559f-78e8-72c0-8e00-949fdae17bb4Local evidence:
~/.codex/sqlite/codex-dev.dbgets anautomation_runsrow for that thread id with statusIN_PROGRESS.~/.codex/state_5.sqlitehas no matching row inthreadsfor that same id.~/.codex/sessions/...has no rollout file for that exact thread id.Extra notes:
python3,node,git, andbashare present in WSL.automation_runsrow alone did not fix it permanently. The app still tried to reopen the same dead thread from cached state.This looks like the same underlying orphaned-thread / missing-rollout class, but via Automations on Windows+WSL rather than only normal thread resume.
moodysalem commentedon Sep 10, 2026
Additional evidence for the same orphaned-entry failure on Linux with CLI/TUI and persistent app-server 0.154.0:
An empty ordinary session was started and then shut down without ever running a turn. The overview retained its row.
codex archive <id>returned onlyError: failed to archive session; the underlyingthread/archiveresponse was-32600: no rollout found for thread id <id>.thread/readreturnedthread not loaded. Read-only inspection confirmed no state row, rollout, turn history, or pending input for that empty session. Lifecycle logs showed the empty session's start and idle shutdown.The source appears to explain the combination:
RolloutRecorder::newdefers file creation until persistence.track_agents_overview_notificationretains overview membership:ThreadClosedchanges status toNotLoaded, while onlyThreadArchived/ThreadDeletedremoves the row. Failed metadata reads log a warning without evicting the stale membership.archive_thread_with_pathsrequiresresolve_currentto return a rollout, so archiving cannot produce the notification that would remove this row.Suggested regression case: start a non-ephemeral empty thread while another TUI observes the overview; close/unload it before the first persisted user turn; then archive its retained overview entry. The UI should provide a working cleanup path for a confirmed non-persisted closed session, without treating ordinary transient read failures as permission to remove valid sessions.
No private session identifiers, paths, prompts, or raw logs are included here.
thnk2wn commentedon Sep 11, 2026
Adding a macOS reproduction with a known deletion path:
Observed sequence
Leave the desktop app running with existing local tasks visible in a project sidebar.
Delete specific saved tasks using the supported CLI command:
The CLI reports
Deleted session <task-uuid>.Read-only checks confirm the deleted task IDs are absent from the
threadstable instate_5.sqliteand their recorded rollout files are gone. The set of removed top-level IDs matches exactly the requested deletions; other task records remain.Desktop still displays the deleted tasks in the project sidebar.
Clicking one of the stale rows displays:
The missing rollout is expected after successful deletion. The problem is that desktop continues presenting the deleted task as available to open.
Unlike the earlier manually deleted rollout-file scenario discussed above, these deletions were performed with
codex delete, and both the task record and rollout were removed. No manual database mutation or rollout-file deletion was used.Expected behavior
The desktop task list should reconcile deletions made through the supported CLI and remove the stale rows. If a user clicks an entry already confirmed deleted, the app should refresh/remove it and explain that it was deleted rather than repeatedly attempting to resume a nonexistent rollout.
Confirmed: fully quitting and relaunching the desktop app did not clear the stale sidebar entries. They remain visible after a full restart. The internal persistence/cache/notification cause is not established.
No screenshots, task titles, real task IDs, project names, account details, or raw logs are included.