[BUG] VSCode extension session history picker returns zero entries; CLI resumes same files fine - Closing as duplicate of 50170
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Summary
The VSCode extension's Session history picker returns zero entries for any workspace, including for sessions just written by the same extension instance. No errors are emitted. The data on disk is valid — the CLI finds and resumes the same files without issue.
Environment
- OS: Windows 11
- VSCode: 1.119 (current)
- Claude Code extension: 2.1.132
- Claude Code CLI: 2.1.132
- Workspace: a mapped drive on a corporate machine
Verified state on disk
- Multiple historical session
.jsonlfiles plus the freshly-written test session exist in the expected~/.claude/projects/<encoded-folder>/location. - Each file's
cwdfield is recorded by the extension with a lowercase drive letter. - The active lock file at
~/.claude/ide/<pid>.lockrecordsworkspaceFolderswith the same lowercase drive letter — matching thecwdin the session files. Internally consistent. claude --resume <uuid>from the integrated terminal successfully resumes any of these sessions.
Ruled out as causes
- Stale extension state: no Claude/Anthropic data under
%APPDATA%\Code\User\globalStorageorworkspaceStorage. - VSCode version: previously on 1.104, hit
contribSecondarySidebarproposed-API errors. Updated to 1.119, those errors are gone, picker still empty. - Path casing: extension writes the drive letter lowercase consistently in both
cwdand the lock file. PowerShell,cmd, andGet-PSDriveall report it uppercase, so the lowercase originates inside Node/Electron — but the internal consistency between session files and lock file rules casing out as the cause of the picker mismatch. - Multi-instance interference: same empty-picker behavior when running a single VSCode instance.
- File access / permissions:
Get-ChildItemreads the project folder and all.jsonlfiles without issue.
Dev console output
The only Claude-related entries on extension activation:
[Extension Host] Created lock file at <user>\.claude\ide\<pid>.lock
[Extension Host] Set CLAUDE_CODE_SSE_PORT=<port> in terminal environment (in-memory)
No errors, no warnings, no log output when the Session history button is clicked.
Diagnosis
The extension activates cleanly, identifies the workspace correctly, writes session files with the correct cwd, and the lock file confirms the extension's view of the workspace path matches what's in those files. Despite this, the picker silently returns zero results. Since the CLI resumes the same files correctly, the data layer is intact — the bug is in the extension's session-listing logic.
Workaroundclaude --resume <uuid> from the integrated terminal works, but requires knowing the UUID.
Available for further diagnosis
Happy to provide a sanitized lock file, the first line of a session .jsonl showing cwd, dev console output during a Session history click, or any other diagnostic. If there's a verbose / debug logging mode in the extension I can enable, please point me to it and I'll capture the output.
What Should Happen?
The picker should list all session files for the current workspace that exist on disk under ~/.claude/projects/, including sessions just written by the current extension instance.
Error Messages/Logs
[Extension Host] Created lock file at <user>\.claude\ide\<pid>.lock
[Extension Host] Set CLAUDE_CODE_SSE_PORT=<port> in terminal environment (in-memory)
Steps to Reproduce
- On Windows, open VSCode (1.119) at any project folder. Confirm the Claude Code extension (2.1.132) is installed and activates.
- In the Claude Code panel, start a new session, send a single message (e.g., "test"), wait for a response, then end the session by starting a new one.
- Confirm the session was written to disk: a new .jsonl file should appear under ~/.claude/projects/<encoded-folder>/, where <encoded-folder> is the workspace path with separators replaced by
-. The file's first non-queue line will contain a "cwd" field matching the current workspace, and "entrypoint":"claude-vscode". - Confirm the extension knows the workspace: open ~/.claude/ide/<pid>.lock (where <pid> corresponds to the running VSCode process). The workspaceFolders array should contain the same path string as the cwd in step 3.
- Click the Session history button (clock icon) in the Claude Code panel header.
No specific code or file contents are required to reproduce — any workspace where the extension can write a session is sufficient. The bug reproduces across multiple workspaces and across multiple VSCode instances on the same machine.
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
v2.1.132
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
Verified state on disk:
- Multiple historical session .jsonl files plus the freshly-written test session exist in the expected ~/.claude/projects/<encoded-folder>/ location.
- Each file's cwd field is recorded by the extension with a lowercase drive letter.
- The active lock file at ~/.claude/ide/<pid>.lock records workspaceFolders with the same lowercase drive letter, matching the cwd in the session files. Internally consistent.
- claude --resume <uuid> from the integrated terminal successfully resumes any of these sessions.
Ruled out as causes:
- Stale extension state: no Claude/Anthropic data under %APPDATA%\Code\User\globalStorage or workspaceStorage.
- VSCode version: previously on 1.104, hit contribSecondarySidebar proposed-API errors. Updated to 1.119, those errors are gone, picker still empty.
- Path casing: extension writes the drive letter lowercase consistently in both cwd and the lock file. PowerShell, cmd, and Get-PSDrive all report it uppercase, so the lowercase originates inside Node/Electron — but the internal consistency between session files and lock file rules casing out as the cause of the picker mismatch.
- Multi-instance interference: same empty-picker behavior when running a single VSCode instance.
- File access / permissions: Get-ChildItem reads the project folder and all .jsonl files without issue.
Diagnosis:
The extension activates cleanly, identifies the workspace correctly, writes session files with the correct cwd, and the lock file confirms the extension's view of the workspace path matches what's in those files. Despite this, the picker silently returns zero results. Since the CLI resumes the same files correctly, the data layer is intact — the bug is in the extension's session-listing logic.
Workaround: claude --resume <uuid> from the integrated terminal works, but requires knowing the UUID.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗