claude-code - 💡(How to fix) Fix VS Code extension 2.1.126: historical sessions not shown in sidebar or /resume (CLI works) — regression [1 comments, 2 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#56104Fetched 2026-05-05 05:58:07
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Timeline (top)
labeled ×5commented ×1cross-referenced ×1

In the Claude Code VS Code extension v2.1.126, the sidebar "Local" sessions panel and the /resume slash command in chat do not list any historical sessions — they only show currently-active tabs.

The bundled CLI claude --resume (run from a regular terminal) does list all the historical sessions correctly. So the file layer and core listing logic are healthy; the regression is in the extension's UI listing path.

The user reports this view worked correctly ~3 weeks ago (around mid-April 2026).

Root Cause

In the Claude Code VS Code extension v2.1.126, the sidebar "Local" sessions panel and the /resume slash command in chat do not list any historical sessions — they only show currently-active tabs.

The bundled CLI claude --resume (run from a regular terminal) does list all the historical sessions correctly. So the file layer and core listing logic are healthy; the regression is in the extension's UI listing path.

The user reports this view worked correctly ~3 weeks ago (around mid-April 2026).

Fix Action

Fix / Workaround

Workarounds

RAW_BUFFERClick to expand / collapse

Summary

In the Claude Code VS Code extension v2.1.126, the sidebar "Local" sessions panel and the /resume slash command in chat do not list any historical sessions — they only show currently-active tabs.

The bundled CLI claude --resume (run from a regular terminal) does list all the historical sessions correctly. So the file layer and core listing logic are healthy; the regression is in the extension's UI listing path.

The user reports this view worked correctly ~3 weeks ago (around mid-April 2026).

Environment

  • OS: Windows 11 Enterprise 26200
  • Extension: anthropic.claude-code 2.1.126-win32-x64
  • Workspace path: a:\Source (mapped drive; Resolve-Path returns A:\Source, NTFS is case-insensitive on this dir)
  • ~80 historical session JSONL files in ~/.claude/projects/a--Source/, ranging from April to today

Reproduction

  1. Open a workspace in VS Code that has many historical sessions in ~/.claude/projects/<encoded-path>/.
  2. Open the Claude Code sidebar → "Local" tab → only currently-open tabs are shown, no history.
  3. Type /resume inside an open Claude Code chat → no historical sessions appear in the picker.
  4. From a regular PowerShell terminal in the same workspace, run claude --resumeall historical sessions are listed correctly.

What was verified directly

  1. Files are intact and complete — JSONL files contain valid user/assistant entries (e.g. one file is 2 MB with 75 "type":"user" lines) and end with {"type":"ai-title","aiTitle":"...","sessionId":"..."} lines.
  2. Title markers present in all sampled filesaiTitle appears within the first 64 KB of every sampled file (positions 3,882 / 5,541 / 34,287 bytes for three sample files of 894 KB / 298 KB / 1.47 MB), well within the head chunk size F2 = 65536 used by xz4.
  3. The filter logic in extension.js should accept these files — at line 161, c5(G,"customTitle")||c5(x,"customTitle")||c5(G,"aiTitle")||c5(x,"aiTitle") finds a title in the head/tail chunks; c5 (defined on line 158) returns the last matching "key":"value" occurrence in a string.
  4. The bundled CLI lists everything correctly from the same workspace — same claude.exe that ships in the extension's resources/native-binary/ folder.

Hypothesis

The bug is between the listing function (gz4Qz4xU$l) and the webview UI message-passing layer. The listing logic itself works (the CLI proves it), but results don't reach either the sidebar Local panel or the /resume picker. Possibly related to:

  • A stale extension-globalState cache that isn't invalidated when the bundled CLI updates the on-disk format
  • A change to il(V) (which calls realpath + normalize("NFC")) producing a different path than the writer uses (a:\Source vs realpath result A:\Source — though NTFS is case-insensitive here)
  • A new filter/predicate added since the last working version that incorrectly drops files

Workarounds

  • Use claude --resume from a regular terminal instead of /resume in chat — this works.
  • Downgrade the extension to a version from ~mid-April 2026.

extent analysis

TL;DR

The issue can be temporarily worked around by using the claude --resume command from a regular terminal or downgrading the extension to a previous version.

Guidance

  • Verify that the extension.js file is correctly filtering the historical sessions by checking the logic at line 161 and ensuring that the c5 function is returning the expected results.
  • Investigate the possibility of a stale extension-globalState cache that isn't being invalidated when the bundled CLI updates the on-disk format.
  • Check if the il(V) function is producing a different path than the writer uses, potentially causing issues with file discovery.
  • Consider downgrading the extension to a version from ~mid-April 2026 to see if the issue persists.

Example

No code snippet is provided as the issue is more related to the extension's functionality and configuration rather than a specific code error.

Notes

The issue seems to be specific to the VS Code extension and not related to the underlying CLI or file format. The fact that the CLI lists all historical sessions correctly suggests that the issue lies in the extension's UI listing path.

Recommendation

Apply the workaround of using claude --resume from a regular terminal or downgrade the extension to a previous version, as the root cause of the issue is not yet fully understood and a direct fix is not available.

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