Archived chats page is empty even though archived threads exist in state_5.sqlite

Open 💬 3 comments Opened Jun 26, 2026 by xulong-jia
💡 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)?

26.616.71553

What subscription do you have?

ChatGPT Pro

What platform is your computer?

Darwin 25.5.0 arm64 arm

What issue are you seeing?

Summary

In Codex Desktop, the Archived Chats page shows "No archived chats", but local state indicates that archived threads still exist.

The data does not appear to be lost. The SQLite database is healthy, archived threads exist, previews are non-empty, and rollout files still exist on disk.

Environment

  • Product: Codex Desktop App
  • Codex App version: 26.616.71553
  • CLI version: codex-cli 0.142.2
  • Platform: macOS
  • State database: ~/.codex/state_5.sqlite

Steps to Reproduce

  1. Open Codex Desktop.
  2. Archive one or more chats.
  3. Go to Settings.
  4. Open the Archived Chats page.
  5. The page shows no archived chats.

Expected Behavior

Archived chats should appear in the Archived Chats page and be available for unarchive or review.

Actual Behavior

The Archived Chats page is empty and shows no archived chats.

Investigation

I inspected the local Codex state database and found that the archived data still exists.

Results:

  • pragma integrity_check returns ok
  • threads table contains archived threads
  • archived=1 thread count: 4
  • archived=1 AND preview<>'' count: 4
  • archived=1 AND preview='' count: 0
  • All archived thread rollout_path files exist
  • ~/.codex/archived_sessions contains archived jsonl files

Archived thread examples:

| id | title | preview length | archived | rollout_path |
|---|---|---:|---:|---|
| 019f0170-9346-7330-a867-633956d633bd | Archived SmartTraffic audit thread | 500 | 1 | exists |
| 019ef8fc-ddf8-7071-ac8d-db163bdf3501 | SmartTraffic Stage 5 closing docs/tag thread | 2343 | 1 | exists |
| 019ef38d-a3e2-7483-85d9-2e1d8e8d5a77 | SmartTraffic Stage 5A thread | 3060 | 1 | exists |
| 019ef268-affe-70c2-9b6b-a7593a174dbf | SmartTraffic Stage 5B pre-commit review thread | 4153 | 1 | exists |

Additional Notes

This does not look like data loss or SQLite corruption.

It looks more like the Archived Chats page is using an additional UI filter, stale cache, or query condition that does not match the actual archived thread data in state_5.sqlite.

I previously had another issue where normal history threads were hidden because their preview field was empty. After filling missing previews, normal history became visible again. However, the Archived Chats page is still empty even though archived thread previews are non-empty.

What steps can reproduce the bug?

  1. Open Codex Desktop.
  2. Archive one or more conversations.
  3. Open Settings.
  4. Open the "Archived Chats" page.
  5. The page shows "No archived chats".

However, the local state still contains archived threads.

I verified that:

  • state_5.sqlite is healthy (pragma integrity_check = ok)
  • archived=1 threads still exist
  • archived thread previews are non-empty
  • archived rollout files still exist on disk

What is the expected behavior?

Archived conversations should appear in the Archived Chats page and be available for viewing or restoring.

Additional information

Additional local investigation:

The issue does not appear to be data loss.

Local checks show:

  • state_5.sqlite integrity check: ok
  • archived=1 threads: 4
  • archived=1 AND preview<>'': 4
  • archived=1 AND preview='': 0
  • All archived thread rollout_path files exist
  • ~/.codex/archived_sessions contains archived .jsonl files

This may be related to #28664, but my case specifically affects archived=1 threads and the Archived Chats page.

<img width="1512" height="509" alt="Image" src="https://github.com/user-attachments/assets/63da1aa3-0539-40ce-9d18-86da14779945" />

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 2 months ago

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

  • #29600

Powered by Codex Action

Nicolas0315 · 2 months ago

I traced the repo-owned path for this one. In this checkout I could not find a list-archived-threads or Archived Chats webview implementation; the protocol exposed here is thread/list, with archived and useStateDbOnly parameters.

What I verified locally on current main (d047c33a1):

cargo nextest run -p codex-app-server thread_list_archived_filter --no-fail-fast
# PASS suite::v2::thread_list::thread_list_archived_filter

cargo nextest run -p codex-app-server thread_list_state_db_only_returns_sqlite_without_jsonl_repair --no-fail-fast
# PASS suite::v2::thread_list::thread_list_state_db_only_returns_sqlite_without_jsonl_repair

The backend code path already routes thread/list with archived: true to the archived listing, and when useStateDbOnly is also true it calls the state-db archived listing path. So I don't currently see a Rust-side data-loss or missing-archive-listing bug in this repo.

This lines up with #29600's bundle inspection: the Desktop Archived Chats page appears to use a client/webview-side list-archived-threads path that is not present in this repository, and that likely needs the UI-side fix. A useful next check in the Desktop app would be to inspect the actual list-archived-threads response for hostId: local and compare it with what the page passes into its archived-thread renderer.

xulong-jia · 2 months ago

Thanks for taking a look.

That matches what I observed locally.

I also confirmed that:

  • state_5.sqlite integrity is OK.
  • Archived threads still exist.
  • Archived previews are non-empty.
  • Rollout files are still present.

So I agree it now looks much more like a Desktop UI / webview issue rather
than a database or backend issue.

If it helps, I'm happy to test a debug build or capture additional
information from the Desktop client.

On Sat, Jun 27, 2026 at 10:44 AM Nicolas0315 @.***>
wrote:

Nicolas0315 left a comment (openai/codex#30312) <https://github.com/openai/codex/issues/30312#issuecomment-4814394907> I traced the repo-owned path for this one. In this checkout I could not find a list-archived-threads or Archived Chats webview implementation; the protocol exposed here is thread/list, with archived and useStateDbOnly parameters. What I verified locally on current main (d047c33a1): cargo nextest run -p codex-app-server thread_list_archived_filter --no-fail-fast # PASS suite::v2::thread_list::thread_list_archived_filter cargo nextest run -p codex-app-server thread_list_state_db_only_returns_sqlite_without_jsonl_repair --no-fail-fast # PASS suite::v2::thread_list::thread_list_state_db_only_returns_sqlite_without_jsonl_repair The backend code path already routes thread/list with archived: true to the archived listing, and when useStateDbOnly is also true it calls the state-db archived listing path. So I don't currently see a Rust-side data-loss or missing-archive-listing bug in this repo. This lines up with #29600 <https://github.com/openai/codex/issues/29600>'s bundle inspection: the Desktop Archived Chats page appears to use a client/webview-side list-archived-threads path that is not present in this repository, and that likely needs the UI-side fix. A useful next check in the Desktop app would be to inspect the actual list-archived-threads response for hostId: local and compare it with what the page passes into its archived-thread renderer. — Reply to this email directly, view it on GitHub <https://github.com/openai/codex/issues/30312?email_source=notifications&email_token=BXOGATRLYO7S2WKJZIY4TDL5B4KHBA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIOBRGQZTSNBZGA32M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-4814394907>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/BXOGATV5H3LF5WVYF2JMBZT5B4KHBAVCNFSNUABFKJSXA33TNF2G64TZHM4TMNJUGE2TMNBZHNEXG43VMU5TINZVGU4DGMBYHE4KC5QC> . Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS <https://github.com/notifications/mobile/ios/BXOGATQBX3G2FFDPCLHVYC35B4KHBA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIOBRGQZTSNBZGA32M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KUZTPN52GK4S7NFXXG> and Android <https://github.com/notifications/mobile/android/BXOGATQUT3PFXW5EKFHOT2T5B4KHBA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIOBRGQZTSNBZGA32M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2K4ZTPN52GK4S7MFXGI4TPNFSA>. Download it today! You are receiving this because you authored the thread.Message ID: @.***>