claude-code - 💡(How to fix) Fix Session picker: sort order, UUID search, and older-format sessions fail to open

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…

Error Message

"The editor could not be opened due to an unexpected error. Please consult the log for more details."

  1. Show a readable error (or forward-migrate older session formats) when loading an older session fails.

Root Cause

At scale this compounds Bug 1: if recent sessions can't be found by scrolling (because of sort/pagination), the only fallback is title search — but title search doesn't match UUIDs, and titles are commonly duplicated across sessions (re-running the same kind of work produces similar auto-generated titles), so a title query can easily return the wrong session.

RAW_BUFFERClick to expand / collapse

Environment

  • Claude Code VS Code extension
  • Versions observed: 2.1.81 (older session that now fails to open), 2.1.105, 2.1.114
  • OS: Windows 11

Scale context (relevant to Bugs 1 & 2)

A single project's session store (.claude/projects/<slug>/) can accumulate a very large number of .jsonl files — easily thousands per week on active projects and, at the high end, 10,000+ sessions in one project directory. The picker's behavior degrades sharply in this regime: recent sessions cannot be found either by scrolling the list or by title search, even though they exist on disk and pass JSONL validation.

Reducing the project directory's file count (by archiving older .jsonl files to a sibling folder) makes the picker usable again — which strongly suggests the picker is either paginating / capping the returned list, sorting by something other than mtime, or doing an O(N) search that produces poor results at scale. Users should not have to GC their own session store for the picker to work.

Bug 1 — picker does not sort by mtime (or does not show recent sessions at scale)

Symptoms at ~10,000+ sessions in one project dir:

  • Sessions modified within the last 15 minutes are not visible at the top of the picker.
  • Scrolling the list does not reliably surface them — they appear to be interleaved with, or pushed off by, older sessions.
  • No date / timestamp column is shown, so the ordering (whatever it is) is opaque.

Expected:

  • Sort by mtime desc by default.
  • Show a date/time column so users can verify the order and disambiguate similar-titled sessions.
  • If the picker caps the result list, document the cap and still guarantee the N most-recent sessions are included.

Bug 2 — picker search matches title only; degrades at scale

Typing a session UUID (or UUID prefix) into the picker's search box returns "No sessions found" even when the session exists on disk at .claude/projects/<slug>/<uuid>.jsonl.

At scale this compounds Bug 1: if recent sessions can't be found by scrolling (because of sort/pagination), the only fallback is title search — but title search doesn't match UUIDs, and titles are commonly duplicated across sessions (re-running the same kind of work produces similar auto-generated titles), so a title query can easily return the wrong session.

Expected:

  • Match on session ID prefix in addition to title.
  • Display the UUID (at least a prefix) and the mtime next to each entry in the list, so even when titles collide the correct session can be picked.

Bug 3 — older-format sessions fail to open

Selecting a session recorded by an older extension version (observed: 2.1.81) from a current extension version (2.1.114) shows:

"The editor could not be opened due to an unexpected error. Please consult the log for more details."

with no additional detail in the editor. The underlying JSONL parses cleanly line-by-line and contains the expected ai-title, user, and assistant-type records, so the failure is in the extension's session loader rather than in the file.

Asks

  1. Sort the picker by mtime desc by default; add a date/time column.
  2. Include session UUID (at least a prefix) in the picker's search index and/or displayed entries.
  3. Show a readable error (or forward-migrate older session formats) when loading an older session fails.
  4. Document any cap the picker applies to the session list, and ensure the most-recent N are always included.

extent analysis

TL;DR

The most likely fix involves updating the picker's sorting and search functionality to handle large numbers of sessions and older session formats.

Guidance

  • Verify that the picker is indeed paginating or capping the returned list, and if so, determine the cap value to ensure the most recent sessions are included.
  • Consider modifying the picker's search index to include session UUIDs (at least a prefix) in addition to titles, to improve search results at scale.
  • Investigate the session loader's compatibility with older session formats (e.g., from version 2.1.81) to resolve the "unexpected error" issue when opening older sessions.
  • Add a date/time column to the picker to display session modification times, allowing users to verify the sorting order and disambiguate similar-titled sessions.

Example

No code snippet is provided, as the issue does not contain sufficient technical details to generate a specific example.

Notes

The issue is specific to the Claude Code VS Code extension, and the suggested fixes may require modifications to the extension's codebase. The exact implementation details are not provided, and further investigation is needed to determine the best approach.

Recommendation

Apply a workaround by reducing the number of sessions in the project directory (e.g., by archiving older sessions) to improve the picker's performance, while awaiting a more permanent fix to the extension's sorting and search functionality.

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 Session picker: sort order, UUID search, and older-format sessions fail to open