Desktop sidebar/search hides older local project chats although thread data still exists on disk (multi-project, reproducible)

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

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

Version 26.506.20924 (2565)

What subscription do you have?

Plus

What platform is your computer?

21.6.0 arm64 arm

What issue are you seeing?

Codex Desktop sidebar/search is hiding older local chats for multiple projects even though the chats still exist locally. (_Codex helped write this report but through extensive back and forth working on the issue with me_)

  • Project roots are visible in sidebar.
  • New chats in those projects appear and are searchable.
  • Older chats in those same projects are missing from sidebar and not returned by sidebar search.

I verified local data still exists for missing chats in all of:

  • ~/.codex/state_5.sqlite (threads rows exist, archived=0, source='vscode', correct cwd)
  • ~/.codex/session_index.jsonl (IDs present)
  • ~/.codex/sessions/.../rollout-*.jsonl (rollout files exist)

Representative IDs (redacted-safe):

  • Missing older: 019d7478-212c-7a51-858c-3bd7c9886376, 019d7481-c42a-7e63-80af-06e7598f5121
  • Visible newer in same project: 019e034b-b67f-75c0-bb36-4d470c743b04, 019e03ab-1ab1-7870-b21f-97f79348480f

No explicit UI error message is shown.

What steps can reproduce the bug?

  1. Use Codex Desktop across several projects for days/weeks so each project has older and newer chats.
  2. Restart/reopen Codex Desktop.
  3. Observe that some projects appear in sidebar but older chats are missing/empty.
  4. Create a brand-new chat in one affected project; it appears immediately.
  5. Older chats in that project remain hidden in sidebar/search despite existing in local stores.

Read-only verification commands used:

  • sqlite3 ~/.codex/state_5.sqlite "select id,cwd,source,archived,has_user_event,datetime(updated_at,'unixepoch') from threads where cwd='<PROJECT_ROOT>' and archived=0 and first_user_message<>'' order by updated_at desc;"
  • rg '<THREAD_ID>' ~/.codex/session_index.jsonl
  • test -f "<ROLLOUT_PATH>" && echo exists

I do not have session-id/token-limit/context-window metrics for this issue (this is not an API runtime/token-limit failure).

What is the expected behavior?

If a project is visible in the sidebar, all unarchived local chats for that project should remain visible/searchable (or at least pageable/searchable), including older chats—not only newly created ones.

Additional information

  • Environment: macOS, Codex Desktop recent sessions on 0.128.0-alpha.1.
  • A control project with recent activity still shows many chats (including chats from recent weeks), while several other projects show empty/near-empty; this suggests selective sidebar indexing/hydration failure rather than global data loss.
  • I tested multiple local recovery attempts (metadata toggles, index refresh, timestamp bump).
  • Only workaround that consistently made a hidden old chat appear:
  • clone to a new thread ID
  • use a new rollout file path
  • add index entry

This suggests stale/broken historical thread identity/index lineage in Desktop UI hydration.

I can upload redacted artifacts if helpful:

  • state_5.sqlite (or query exports)
  • session_index.jsonl (redacted)
  • affected thread IDs and project roots (redacted placeholders)

Please confirm whether this matches known issue class #20419 / #14751, and whether there is a supported local “rebuild/reindex sidebar from local stores” recovery action.

View original on GitHub ↗

4 Comments

github-actions[bot] contributor · 3 months ago

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

  • #20419
  • #21128
  • #20833
  • #20608
  • #20959

Powered by Codex Action

SujoyBhattacharyya6 · 3 months ago

Thanks — I reviewed all suggested duplicates (#20419, #21128, #20833, #20608, #20959).

They are clearly related and describe the same bug class, but I did not find a confirmed maintainer-provided resolution/workaround that fixes my case end-to-end.

What I verified locally before posting:

  • Missing older threads exist in state_5.sqlite (archived=0, source='vscode', correct cwd).
  • Same IDs exist in session_index.jsonl.
  • Corresponding rollout JSONL files exist in ~/.codex/sessions/....
  • New chats in the same affected projects appear; older ones remain hidden.
  • Tested metadata/index recency repairs; no durable fix.
  • Clone to new thread ID + new rollout path makes a hidden thread appear (workaround signal, not a real fix).

I still need a supported recovery path / official fix guidance for multi-project impact.

If this should be consolidated, I’m happy to close and move all diagnostics to the canonical issue — please indicate which issue to track.

YYH168 · 3 months ago

Additional proposal: implement per-project lazy loading in the Codex Desktop sidebar.

Current behavior appears to load a small global recent thread list first, then group those loaded threads by workspace/project. This means a project can show “No chats” even when it has historical sessions, if its latest thread is outside the global recent window or if the active session is not represented as a normal historical item.

Suggested behavior:

  1. Keep the global recent thread request for fast initial rendering.
  2. When a project group is expanded, lazily request that project’s threads by cwd:
  • cwd = <workspace root>
  • archived = false
  • include threads with either has_user_event = true or non-empty first_user_message
  • ORDER BY updated_at DESC
  • default page size around 50
  • cursor-based pagination for “load more”
  1. Merge global recent threads and project-loaded threads by threadId.
  2. Cache pagination state per project/cwd.
  3. Invalidate only the affected project cache when a thread is created, resumed, archived, unarchived, or renamed.
  4. Limit concurrent project lazy-load requests to a small number, e.g. 2-4.
  5. Use existing workspace root hints for active sessions, so an active thread can still appear under the correct project even before it is fully materialized as a historical item.

Acceptance criteria:

  • A project whose latest historical session is outside the global top 50 still shows its history when expanded.
  • Projects with many historical sessions can page through older sessions.
  • Active sessions are grouped under the correct workspace instead of causing the project to appear empty.
  • Startup does not need to scan or load all historical cwd values.
Xp2510 · 3 months ago

I opened a related issue, was referred to this issue, and it might be the same thing - the terribly-named Filter option "Relevant Chats", which actually just means "Recent Chats" and hides everything older than 3 days. Codex itself won't find this, it's completely obtuse.

Anyway, now the entire Filter option seems to have been removed.

I love Codex, but man is this ever a "move fast & break things" app.