Skip to content

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

Description

@xulong-jia

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.

Image

Activity

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

    appIssues related to the Codex desktop appbugSomething isn't workingsessionIssues involving session (thread) management, resuming, forking, naming, archiving

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions