Codex Desktop project sidebar omits older unarchived threads

Open 💬 3 comments Opened May 1, 2026 by chuanyuj
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What issue are you seeing?

Codex Desktop stopped showing some older project threads in the project sidebar after restart, even though the underlying local records still existed and were not archived.

Restarting the app and refreshing local metadata did not restore the missing threads. This appears to be a sidebar listing, indexing, or pagination issue rather than data loss.

Steps to reproduce

  1. Use Codex Desktop with multiple threads under a project.
  2. Restart the app after the project has accumulated older threads.
  3. Observe that only recent threads appear under the project.
  4. Verify that the missing threads still exist locally and are not archived.

Expected behavior

Unarchived project threads should remain visible and searchable after restart. If the sidebar index becomes stale, Codex should reconcile it automatically or provide a supported reindex or repair path.

Additional information

This appears related to #20419 and #17540, although the observed case did not recover after restart or a metadata refresh.

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 3 months ago

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

  • #20419
  • #20254
  • #20493

Powered by Codex Action

chuanyuj · 3 months ago

I reviewed the bot-suggested potential duplicates:

  • #20419 is the closest match and likely in the same Desktop sidebar/history visibility family. The difference here is that this report is a narrower macOS project-root case where state_5.sqlite integrity is OK, the affected rows are titled and archived=0, rollout files exist, and restart + metadata/index refresh still did not restore the older project threads to the sidebar. In #20419, promoting affected threads back into the recent window could make them visible again; that did not work here.
  • #20254 is a Windows variant and is already closed as a duplicate of #17540.
  • #20493 involves update/import flow behavior and a corrupt state_5.sqlite / imported-thread blank view path. In this case the DB integrity check passes and this is not an imported-agent flow.

So I agree this is related to #20419 / #17540, but I do not think it is an exact duplicate of the suggested issues. If maintainers want one canonical issue for the broader sidebar/indexing bug, I can follow that direction.

mu-liang-ai · 3 months ago

I can reproduce what appears to be the same Desktop sidebar recent-window bug.

Observed:

  • The sidebar currently shows about 49 visible threads total across all projects.
  • Creating a new thread appears to push one older thread out of the visible sidebar, even if it belongs to another project.
  • The missing older threads are not deleted and not archived.
  • They still exist in ~/.codex/state_5.sqlite and their rollout JSONL files still exist under ~/.codex/sessions.
  • For one affected project, an older unarchived thread ranks around #115 by updated_at among active local threads, so it falls outside the apparent global recent window.

This looks like the Desktop sidebar is grouping only a globally preloaded recent subset, rather than querying/paginating per project/cwd when a project is expanded.

Expected:
When expanding a project, Codex Desktop should fetch that project’s full local thread history by cwd, or continue paginating until matching project threads are loaded. A user-configurable recent thread preload limit would also help as a mitigation.