codex - 💡(How to fix) Fix macOS Desktop sidebar hides older local conversations despite existing thread state [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#20419Fetched 2026-05-01 05:43:14
View on GitHub
Comments
2
Participants
2
Timeline
7
Reactions
0
Timeline (top)
labeled ×3commented ×2cross-referenced ×2

Root Cause

  • Expanding a project/workspace should load the full local conversation history for that workspace, or page through results until exhausted.
  • Sidebar search should be able to find locally existing unarchived threads, even if they are older than the initial recent-thread window.
  • A project/workspace should not appear empty just because its threads fall outside the global recent preload.
  • session_index.jsonl drift should be repaired or tolerated without hiding valid local sessions.
  • Malformed session JSONL files should be reported and skipped, not cause the whole local history scan to fail.
  • If filesystem mtime, SQLite updated_at, updated_at_ms, and session_index.jsonl.updated_at all participate in reindexing, they should be documented and reconciled consistently.
RAW_BUFFERClick to expand / collapse

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

Codex Desktop: 26.422.71525 (CFBundleVersion 2210)

What subscription do you have?

ChatGPT Pro

What platform is your computer?

macOS 15.6.1 (24G90)

Darwin 24.6.0 arm64

What issue are you seeing?

Older Codex Desktop conversations disappear from the left sidebar / project grouping after normal use over time, even though the local thread data still exists on disk.

This looks like a sidebar/history visibility bug rather than intentional archiving or deletion:

  • The user did not explicitly archive the missing threads.
  • archived_sessions/ exists separately and accounts for archived threads.
  • Active rollout files still exist under ~/.codex/sessions.
  • SQLite and session_index.jsonl still contain substantial thread history.
  • Promoting affected threads back into the recent window by updating metadata can make them visible again, which suggests the sidebar is relying on a limited recent-thread preload rather than loading full workspace history.

Current local evidence, with paths and project names intentionally redacted:

  • ~/.codex/state_5.sqlite contains 201 thread rows.
  • 160 rows are active / unarchived.
  • 41 rows are archived.
  • There are 23 distinct cwd values in SQLite.
  • ~/.codex/sessions contains 160 active rollout JSONL files.
  • ~/.codex/archived_sessions contains 41 archived rollout JSONL files.
  • ~/.codex/session_index.jsonl contains 230 lines but only 194 unique thread ids.
  • A dry-run repair found:
    • 28 duplicate ids in session_index.jsonl
    • 6 thread ids missing from session_index.jsonl
    • 24 orphan index ids
    • 176 valid session-file threads
    • 201 SQLite thread rows
    • 25 malformed/truncated session JSONL files that had to be skipped

This means the local state is not simply empty, but the Desktop sidebar can still behave as if older project conversations no longer exist.

Related existing issues:

  • #14751: Desktop app sidebar only shows loaded recent subset, not full workspace history
  • #16095: Mac app stops showing local threads even though local thread data still exists
  • #17304: Desktop project sidebar hides active threads after state DB migration drift and stale temporary sessions
  • #17540: Windows app variant where older local threads disappear from sidebar/search while still present on disk

What steps can reproduce the bug?

I do not have a minimal clean-room repro yet, but this is the observed workflow:

  1. Use Codex Desktop normally on macOS across many local workspaces/projects.
  2. Accumulate many Codex conversations over time.
  3. Reopen Codex after some days / restarts.
  4. Older conversations that were previously visible in the left sidebar are no longer visible under their project/workspace grouping.
  5. Inspect local state:
    • active rollout JSONL files still exist under ~/.codex/sessions
    • archived rollout JSONL files are separate under ~/.codex/archived_sessions
    • state_5.sqlite still contains many active thread rows
    • session_index.jsonl may contain duplicates, missing ids, or stale orphan ids
  6. Promote a small set of affected workspace threads back into the recent window by updating metadata only.
  7. Restart Codex Desktop.
  8. Those threads can reappear in the sidebar, which indicates this is a visibility / recent-window / index issue rather than intentional archive.

The dry-run repair tooling also had to skip malformed/truncated session JSONL files instead of aborting the whole repair. That may be a separate persistence robustness issue, but it contributes to sidebar/index drift.

What is the expected behavior?

Codex Desktop should continue to show local unarchived conversations unless the user explicitly deletes or archives them.

Specifically:

  • Expanding a project/workspace should load the full local conversation history for that workspace, or page through results until exhausted.
  • Sidebar search should be able to find locally existing unarchived threads, even if they are older than the initial recent-thread window.
  • A project/workspace should not appear empty just because its threads fall outside the global recent preload.
  • session_index.jsonl drift should be repaired or tolerated without hiding valid local sessions.
  • Malformed session JSONL files should be reported and skipped, not cause the whole local history scan to fail.
  • If filesystem mtime, SQLite updated_at, updated_at_ms, and session_index.jsonl.updated_at all participate in reindexing, they should be documented and reconciled consistently.

Additional information

This does not appear to be a user-facing "automatic archive after a few days" feature. I could not find official documentation saying Codex Desktop intentionally archives or hides local conversations after a time window.

The practical behavior is nevertheless similar to auto-archiving from the user's perspective: after enough time / enough newer threads, older conversations disappear from the sidebar even though they still exist locally.

Potential fixes:

  1. When expanding a project/workspace, query local threads by exact cwd / workspace root rather than grouping only the globally preloaded recent subset.
  2. Add proper pagination for project/workspace thread lists.
  3. Make sidebar search query the full local thread store instead of only loaded recent state.
  4. Add a supported local reindex/repair command for sessions, session_index.jsonl, and state_5.sqlite.
  5. Avoid treating malformed individual session files as fatal to broader history discovery.

No raw rollout files, database files, or local paths are attached because they can contain private prompts, project names, and filesystem paths. Redacted artifacts can be provided if maintainers want specific diagnostics.

extent analysis

TL;DR

The most likely fix for the issue of older Codex Desktop conversations disappearing from the left sidebar is to modify the application to query local threads by exact workspace root and implement proper pagination for project/workspace thread lists.

Guidance

  • The issue seems to be related to the application's recent-thread preload limit, which causes older conversations to disappear from the sidebar.
  • To verify this, check the session_index.jsonl file for duplicates, missing ids, or stale orphan ids, and ensure that the state_5.sqlite database still contains the active thread rows.
  • To mitigate the issue, consider promoting affected threads back into the recent window by updating metadata, and then restarting Codex Desktop.
  • Implementing proper pagination for project/workspace thread lists and making sidebar search query the full local thread store could also help resolve the issue.

Example

No code snippet is provided as the issue does not require a specific code change, but rather a modification to the application's behavior.

Notes

The issue may be related to the application's handling of malformed session JSONL files, which could contribute to sidebar/index drift. However, this is not the primary cause of the issue.

Recommendation

Apply a workaround by modifying the application to query local threads by exact workspace root and implement proper pagination for project/workspace thread lists, as this is the most likely fix for the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix macOS Desktop sidebar hides older local conversations despite existing thread state [2 comments, 2 participants]