claude-code - 💡(How to fix) Fix [BUG] Recent threads are displayed in the wrong order and marked with the same timestamp [3 comments, 3 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
anthropics/claude-code#50813Fetched 2026-04-20 12:12:20
View on GitHub
Comments
3
Participants
3
Timeline
6
Reactions
0
Author
Timeline (top)
commented ×3labeled ×3

Error Message

Error Messages/Logs

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

I created a few sessions in sequence. As shown in the image, I created three sessions under the same event, but they appear to be listed in the wrong order. The third item in the list is actually the most recent one. Also, they are shown with the same time, even though they were not created at the same time.

<img width="300" height="201" alt="Image" src="https://github.com/user-attachments/assets/174632ca-34f8-4bdd-9d08-f3bc8eb84fbd" />

What Should Happen?

The sessions should be displayed in the correct chronological order, with the most recently created session appearing first or according to the intended sorting logic. Each session should also show its actual creation timestamp, so different sessions created at different times are not marked with the same time.

Error Messages/Logs

Steps to Reproduce

  1. Open the event page or screen where sessions are listed.
  2. Create three sessions in sequence under the same event.
  3. Return to the sessions list after all three sessions are created.
  4. Check the order in which the sessions are displayed.
  5. Check the timestamp shown for each session.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.114

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

This happen in vs code extension as well.

extent analysis

TL;DR

The issue can be resolved by adjusting the sorting logic to display sessions in the correct chronological order based on their creation timestamps.

Guidance

  • Verify that the creation timestamps are being stored correctly in the database or data storage system used by the Claude Code application.
  • Check the code responsible for retrieving and sorting sessions to ensure it is using the correct timestamp field and sorting algorithm.
  • Review the frontend code to confirm that it is displaying the sessions in the order received from the backend and that the timestamp is being rendered correctly.
  • Consider adding logging or debugging statements to track the session creation and sorting process to identify where the issue occurs.

Example

No specific code example can be provided without more information about the application's codebase, but a general example of sorting sessions by creation timestamp in JavaScript could be:

sessions.sort((a, b) => new Date(b.createdAt) - new Date(a.createdAt));

This assumes sessions is an array of session objects, each with a createdAt property containing the timestamp.

Notes

The issue might be related to how the sessions are being retrieved or sorted on the backend, or how the timestamps are being displayed on the frontend. Without more specific information about the code or database schema, it's challenging to provide a precise solution.

Recommendation

Apply a workaround by adjusting the sorting logic to use the correct timestamp field, as this seems to be the most likely cause of the issue. This should ensure that sessions are displayed in the correct order until a more permanent fix can be implemented.

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

claude-code - 💡(How to fix) Fix [BUG] Recent threads are displayed in the wrong order and marked with the same timestamp [3 comments, 3 participants]