Skip to content

[Windows][Regression] Deleted local Codex tasks remain in local_thread_catalog and reappear after restart #41229

Open

Description

@nakedsleepwalker

What version of the Codex App are you using (From “About Codex” dialog)?

Codex Desktop 26.820.10647.0; Codex CLI 0.150.1 (windows-x86_64).

What subscription do you have?

ChatGPT authentication. Exact plan omitted from this public report.

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64 (Windows 11).

What issue are you seeing?

Local Codex tasks that were archived and deleted reappear in the Desktop sidebar after a full restart. The affected entries include local CLI and VS Code tasks, including dispatched worker/audit tasks. They reappear under both Recents and project sections, making deletion state unreliable and heavily cluttering the sidebar.

The immediate source of the resurrection is ~/.codex/sqlite/codex-dev.db, table local_thread_catalog: stale rows remain there even after the corresponding canonical thread rows and rollout files are gone.

What steps can reproduce the bug?

  1. Archive multiple local Codex tasks.
  2. Delete them from Settings > Archived chats/tasks.
  3. Confirm that they disappear from the visible list.
  4. Fully quit Codex Desktop and VS Code.
  5. Reopen Codex Desktop.
  6. Observe that deleted tasks reappear in Recents and project sections.

This has reproduced repeatedly across complete app restarts.

What is the expected behavior?

Deleted local tasks should remain deleted after restart. Desktop reconciliation should remove or tombstone the matching local_thread_catalog rows when the canonical local thread no longer exists. A stale catalog entry whose thread row and rollout are both absent should also be locally removable without requiring a valid rollout.

Additional information

I performed a controlled diagnostic with Codex Desktop and VS Code fully stopped:

  • Backed up the local state before making any changes.
  • Removed 18 exact thread rows from state_5.sqlite.
  • Moved the 18 exact matching rollout files out of both sessions and archived_sessions into a quarantine directory.
  • PRAGMA integrity_check returned ok.
  • After restart, all 18 exact IDs were absent from state_5.sqlite and no matching rollout files existed under sessions or archived_sessions.
  • Despite that, the same entries were still rendered in the Desktop sidebar.

A subsequent read-only inspection found:

codex-dev.db / local_thread_catalog exact-ID matches: 18
source_kind=cli: 15
source_kind=vscode: 3
host_id=local: 18
missing_candidate=0: 18
codex-dev.db integrity_check: ok

The local catalog sync state had initial_build_complete=1, and its observation sequence/incremental watermark continued advancing, while the last full-reconciliation timestamp predated the incident. This suggests that deletion/missing-thread tombstones are not being propagated into local_thread_catalog, and incremental startup reconciliation does not prune these rows.

Current codex doctor also reports local inventory parity problems, while all inspected databases pass integrity checks:

active rollout files: 467
active DB rows: 414
missing active rows: 53
duplicate rollout thread IDs: 53
missing archived rows: 0
malformed filenames: 0
scan errors: 0

Relationship to existing reports:

Exact thread IDs, titles, account identifiers, usernames, private local paths, conversation contents, screenshots, tokens, and credentials are intentionally omitted. A separate private OpenAI Support report contains the fuller diagnostic context.

Activity

  1. added
    bug
    app
    windows-os
    session
    on Aug 28, 2026
  2. github-actions commented on Aug 28, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    appbugsessionwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions