Skip to content

[Bug]: Recent chat sidebar can reorder old sessions after history/list expansion #522

@Tyler0707

Description

@Tyler0707

Summary

After enabling Codex++ history/list expansion behavior, the Codex desktop recent chat sidebar can show older sessions above newer sessions. Recent chats still exist and can be found by search, but they may disappear from the normal recent list or fail to open reliably from search results.

Symptoms

  • Recent chats are missing from the sidebar recent list.
  • Search can still find the missing chats.
  • Some search results open as a not-loaded state or fail to load.
  • Older sessions appear above newer sessions in the recent list.

Expected behavior

The sidebar recent chat list should be ordered by the actual logical session update time, and searchable sessions should open normally.

Actual behavior

Older sessions may be promoted to the top of the recent list after history/list expansion, while actually recent sessions are pushed down or hidden from the visible recent list.

Technical notes

Local investigation suggests the session data itself is not deleted. The logical session index / local thread metadata still contains the recent sessions with correct update times.

The suspicious part is that older rollout/session files may have their filesystem modified time refreshed during history/list expansion or backfill. If the UI or loader depends on file modified time for ordering, this can reorder the sidebar incorrectly.

Possible cause

A history/list expansion script increases the number of loaded thread/session records. Loading or backfilling many historical sessions at once may touch old rollout files and update their filesystem mtime, causing old sessions to appear recent.

Suggested fix

  • Avoid touching rollout/session files while expanding or backfilling the chat list.
  • Prefer logical thread/session timestamps from the local metadata store for sorting.
  • Do not use filesystem modified time as the source of truth for recent chat ordering.
  • If a script changes list pagination limits, avoid triggering writes to historical session files.

Impact

Users may think recent chat history was lost, even though the underlying session data still exists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions