Skip to content

Codex desktop is showing stale/orphaned thread entries that cannot be reopened or archived. #14162

Open

Description

@cheulyop

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 ....

Submitted feedback with: 019cd5bf-c102-7612-9f3a-2ea899da81f8

What steps can reproduce the bug?

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:

  1. Open Codex desktop and navigate to a thread entry that is still shown in the sidebar/list.
  2. Click the thread to reopen it.
  3. Codex attempts thread/resume, but the backing rollout/thread metadata is missing locally.
  4. 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.

Additional information

No response

Activity

  1. added
    appIssues related to the Codex desktop app
    on Mar 10, 2026
  2. etraut-openai commented on Mar 10, 2026

    @etraut-openai
    Contributor

    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.

  3. cheulyop commented on Mar 10, 2026

    @cheulyop
    Author

    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.

  4. etraut-openai commented on Mar 10, 2026

    @etraut-openai
    Contributor

    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.

  5. agustif commented on Mar 10, 2026

    @agustif

    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?

  6. michaelpearce90 commented on Mar 26, 2026

    @michaelpearce90

    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.

  7. klawdius-noodle commented on Apr 3, 2026

    @klawdius-noodle

    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.
  8. self-assigned this
    on Jul 2, 2026
  9. reopened this on Jul 16, 2026
  10. moodysalem commented on Sep 10, 2026

    @moodysalem

    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.

    The source appears to explain the combination:

    • RolloutRecorder::new defers file creation until persistence.
    • 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.

  11. thnk2wn commented on Sep 11, 2026

    @thnk2wn

    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

    1. Leave the desktop app running with existing local tasks visible in a project sidebar.

    2. Delete specific saved tasks using the supported CLI command:

      codex delete --force <task-uuid>
    3. The CLI reports Deleted session <task-uuid>.

    4. 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.

    5. Desktop still displays the deleted tasks in the project sidebar.

    6. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

appIssues related to the Codex desktop appbugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions