claude-code - 💡(How to fix) Fix VS Code extension session history disappears after switching workspace folders

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…

After accidentally switching the open folder in VS Code and switching back, the session history list in the Claude Code VS Code extension no longer shows previous sessions. Restarting the extension panel and fully closing/reopening VS Code did not fix it.

Root Cause

After accidentally switching the open folder in VS Code and switching back, the session history list in the Claude Code VS Code extension no longer shows previous sessions. Restarting the extension panel and fully closing/reopening VS Code did not fix it.

RAW_BUFFERClick to expand / collapse

Description

After accidentally switching the open folder in VS Code and switching back, the session history list in the Claude Code VS Code extension no longer shows previous sessions. Restarting the extension panel and fully closing/reopening VS Code did not fix it.

Steps to reproduce

  1. Open VS Code in a workspace folder (e.g., ~/Documents/docs/)
  2. Switch to a different folder in VS Code
  3. Switch back to the original folder
  4. Open the Claude Code session history

Expected behavior

All previous sessions for the original folder should reappear in the session history.

Actual behavior

The session history is empty or missing recent sessions, even though the .jsonl session files still exist on disk in ~/.claude/projects/.

Environment

  • macOS (Darwin 25.3.0)
  • Claude Code v2.1.63
  • VS Code extension

extent analysis

TL;DR

The issue may be resolved by checking the file system permissions and ensuring the Claude Code extension has access to the session files in ~/.claude/projects/.

Guidance

  • Verify that the .jsonl session files in ~/.claude/projects/ are readable by the VS Code process, as file system permissions issues could prevent the extension from accessing the files.
  • Check the Claude Code extension settings to ensure that the session history path is correctly set to ~/.claude/projects/.
  • Try manually reloading the session history in the Claude Code extension or checking for any available updates to the extension.
  • If the issue persists, consider checking the VS Code and Claude Code extension logs for any error messages related to file access or session history loading.

Notes

The issue may be specific to the macOS environment or the version of the Claude Code extension being used. Further investigation into the extension's file access and session history loading mechanisms may be necessary to fully resolve the issue.

Recommendation

Apply workaround: Check file system permissions and extension settings to ensure the Claude Code extension has access to the session files, as this is a non-invasive and potentially effective solution.

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…

FAQ

Expected behavior

All previous sessions for the original folder should reappear in the session history.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING