[BUG] History Sessions lost in Vscode plugin
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?
I'm using the Claude VS Code extension. When I tried to resume yesterday's conversation, I found that the chat history inside the extension had disappeared and /resume couldn't locate it. However, when I access ClaudeCLI directly from the command line, the history is still there.
What Should Happen?
The extension’s chat history should be the same as the CLI’s—at the very least, it should preserve the history generated inside the extension itself.
Error Messages/Logs
Steps to Reproduce
Every time I start a new chat in the extension, the history vanishes as soon as I close and reopen the tab.
system: ubuntu 24.04 + SSH vscode plugin:Version 2.0.12 CC: Version: 2.0.13
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
No response
Claude Code Version
2.0.13
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
VS Code integrated terminal
Additional Information
No response
Found 3 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/8667
- https://github.com/anthropics/claude-code/issues/3313
- https://github.com/anthropics/claude-code/issues/8519
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
#8667 seems related, not sure if it is the same issue. no further solutions.
I have confirmed that this is an issue with the symbolic link. As shown in the image, my working directory ~/projects/dma-size/ is actually a symbolic link pointing to /mnt/projects/dma-size/. The plugin did not handle the symbolic link correctly and treated ~/projects/dma-size/ as the actual directory. However, the CLI and backend correctly used /mnt/projects/dma-size/.
when I use /mnt/projects/dma-size/ instead of ~/project/dma-size/ as vscode workspace path, all will be ok
I have confirmed that this is an issue with the symbolic link. As shown in the image, my working directory ~/projects/dma-size/ is actually a symbolic link pointing to /mnt/projects/dma-size/. The plugin did not handle the symbolic link correctly and treated ~/projects/dma-size/ as the actual directory. However, the CLI and backend correctly used /mnt/projects/dma-size/.
This seems to be the correct fix for now. i was having the same issue, as my working folder was being opened via a symlink (~/repositories/project), but was able to resolve it by opening the working folder in vs code using its actual location (/mnt/data/repositories/project). This allowed me to regain access to the conversation history (and also fixed having to re-login to claude over and over again)
I take that back. Restoring sessions is completely unreliable, no matter if using a symbolic link path for project. Simply stopping and restarting vscode and I have no way to recover/resume my current session.
Serious issue
my pc sometimes crash or if pc is overall unexpectedly turned off ilose some history on some conversations i just see Warmup messages and claude dont remember any prevuious context then
I have had this issue since restarting VSCode too - no symlinks, and session history properly resumes in the CLI.
Hi I'm also having this issue,
I'm running vs code on macOS 15, Claude Code Version: 2.0.30
Version: 1.105.1 (Universal) Commit: 7d842fb85a0275a4a8e4d7e040d2625abbf7f084 Date: 2025-10-14T22:33:36.618Z Electron: 37.6.0 ElectronBuildId: 12502201 Chromium: 138.0.7204.251 Node.js: 22.19.0 V8: 13.8.258.32-electron.0 OS: Darwin arm64 24.3.0
Is this a common issue?
I also have the issue, restarting new instance of VS Code Client (connect to Dev Container remotely), do not restore previous conversation.
VS Code Clouse Code Extention 2.0.31 Version: 1.105.1 (system setup) Commit: 7d842fb85a0275a4a8e4d7e040d2625abbf7f084 Date: 2025-10-14T22:33:36.618Z Electron: 37.6.0 ElectronBuildId: 12502201 Chromium: 138.0.7204.251 Node.js: 22.19.0 V8: 13.8.258.32-electron.0 OS: Windows_NT x64 10.0.26100
VS Code Client is on Windows 11. VS Code Server is on Container on Remote System running CentOS Stream 10 (CLI only) via Dev Container: Attach to running Container.
We have this bug, or a variant of it.
- Our org settings are in
/etc/claude-code/manage-settings.json(see the "enterprise managed settings" documentation) - When you run the VS Code extension, it writes history to
/etc/claude-code/projects/. I'm not sure if this is intentional or not. It seems a little odd. - If you close and resume with a new VS Code extension, it doesn't see that history
- The CLI with
claude --resumedoes see the history in/etc/claude-code/projects/ - If we do
cp -R /etc/claude-code/projects ~/.claude/to copy the history to~/.claude/, and run the VS Code extension, it sees the history and you can resume the conversation.
The problem - for us anyway - is that the extension is writing history to /etc/claude-code/projects/ but is not reading history from that location.
Does anyway else have this variant of the problem?
i'm surprised there has been no response to this bug. it seems the problem is related to opening a folder/project in vscode via a symlink vs. opening it using the full (actual) path. (symlink: /home/user/repositories/project vs. path: /mnt/data/repositories/project)
using a symlink always results in lost conversation history. closing vs code, restarting vscode and cc extension will NOT find the previous conversation - there is no resume history.
whereas using the full path results in having a resume history.
please fix this.
I am having the same problem here. Is there any update on this
Hi Claude team! can you please fix this issue? it's seems like it's taking too long already still the issue persists.. This makes it very hard to iterate on the past conversations.. Thanks!
The 0 response fro the maintainer is disgustingly unprofessional!! Until now, 2 months after ticket is opened, this is still not even have any assignee. I started regretting using this tools.
This problem seems to be getting even worse with the new updates — can someone please help here? All my session history seems to now be lost
Ran into this problem. I use the VS Code extension on a project hosted on WSL.
Found this solution :
- Open the extensions logs by opening the command palette
Ctrl+Shift+Pthen look forClaude Code: Show Logs. - Inside the logs, look for Claude extension trying to open the related project, you will find the path it tries to open. Copy it.
- In your terminal,
ls ~/.claude/projects, then find the folder with you project name (it should not be named differently from what Claude tries to open) - Move this folder to the location you copied from the logs
Example :
In the logs, I found something like -home-me-myproject
In ~/.claude/projects, I found something like -mnt-d-debian-myproject
I mv ~/.claude/projects/-mnt-d-debian-myproject ~/.claude/projects/-home-me-myproject
After what, close you VS Code, then open it again code .. Conversations are back.
in my case it's because of the directory permission, the not working claude projects directory has 700 drwx------@ while the working claude projects directory has 755 drwxr-xr-x@
so changing the directory permission fix this problem in my case
I see several workarounds mentioned, but they all require terminal/manual steps.
The root cause is that history.jsonl exists but the UI doesn't persist it in the sidebar. I ran into this constantly and ended up building a VSCode extension that auto-syncs the JSONL files to a searchable sidebar:
https://marketplace.visualstudio.com/items?itemName=agsoft.claude-history-viewer
It works alongside the official extension - just reads the same files Claude Code writes to. Might save some folks the manual grep/jq workflow.