Skip to content

VS Code Extension: Past Conversations not loaded after restart #12872

Open

Description

@cyberdury

Description

After restarting VS Code, the "Past Conversations" list in the Claude Code extension is empty, even though conversation transcripts are stored locally.

Evidence

Conversation data IS being persisted correctly:

  • Location: ~/.claude/projects/<project-path>/
  • Format: .jsonl files (one per conversation)
  • My project folder contains 300+ MB of conversation transcripts

Example:

~/.claude/projects/c--Users-vertr-Desktop-KI-Monitor-Sources-VS-Workspace-DURY-LEGAL-KI-MONITOR/
├── 0007dfc8-cbf3-4f50-b334-64c66137a693.jsonl (734 KB)
├── 00230cc5-48b2-412d-b80d-e40d822c8f9c.jsonl (86 KB)
├── ... (hundreds more)

Expected Behavior

After restarting VS Code, the extension should:

  1. Load existing conversation transcripts from disk
  2. Display them in the "Past Conversations" panel
  3. Allow resuming any of the stored conversations

Current Behavior

  • "Past Conversations" is empty after VS Code restart
  • CLI workaround works: claude --continue and claude --resume can access the stored conversations
  • Data is NOT lost, just not displayed in the VS Code UI

Environment

  • OS: Windows 11
  • VS Code Extension: Claude Code (latest)
  • Storage location: C:\Users\<user>\.claude\

Suggested Enhancement

Optionally allow users to configure:

  • Number of past conversations to display (e.g., last 10-15)
  • Storage location (for users who want to use a different drive)

🤖 Generated with Claude Code

Activity

  1. roxstar-ai commented on Dec 2, 2025

    @roxstar-ai

    So I was having the same issue and I figured out that when Claude coat up upgraded somehow it created a new doc Claude folder and post upgrade. New conversations were being saved inside of that and it found all of my old conversations in an old dot Claude folder important to note that seems like the file that contains the history is a hidden file. I asked Claude code to merge the two instances into the current one and it fixed. It all seems good now this is the second time I've had this happen with an upgrade.

  2. rtsoftvrana commented on Dec 18, 2025

    @rtsoftvrana

    I'm still having this issue, version 2.0.73.

  3. tsylvester commented on Dec 19, 2025

    @tsylvester

    Same problem but apparently claude --resume works on the immediate last conversation even in the VSC extension. Comments indicate that's expected to be CLI only but it works.

  4. melsintexas commented on Jan 3, 2026

    @melsintexas

    I am having the same issue.

  5. codeberg30 commented on Jan 3, 2026

    @codeberg30

    Confirming this issue on Windows 10. Troubleshooting steps taken:

    VS Code updated recently; Claude Code extension is now v2.0.75, CLI is v2.0.76
    After restart, VS Code extension shows empty "Past Conversations" with no UI errors
    Verified conversation data exists in ~/.claude/projects/ as JSONL files (data present from about the past month only)
    claude --resume CLI also only shows conversations from post-update (last ~14 hours)
    LevelDB files exist in AppData\Roaming\Claude\Local Storage\leveldb dating back to July, but unclear if they contain conversation data
    Extension settings contain no path configuration options

    Data may still be on disk but neither VS Code extension nor CLI can currently access older conversations. CLI workaround suggests shared underlying indexing or data location issue post-update.

  6. H0w4rd commented on Jan 6, 2026

    @H0w4rd

    Same problem on Linux.
    Conversations are saved, though, I can resume them in claude binary with /resume command.

  7. melsintexas commented on Jan 7, 2026

    @melsintexas

    @claude do you plan on fixing this issue?

  8. Michall279 commented on Jan 10, 2026

    @Michall279

    Same issue on Mac Tahoe 26.2. Made Claude to record every conversation into .md file, but not ideal for quick searching through it.

  9. Orfeasfil commented on Jan 12, 2026

    @Orfeasfil

    Any update on this?

  10. melsintexas commented on Jan 12, 2026

    @melsintexas

    Any update on this?

    I have had to send a pretty lengthy email to support. Not only is this issue not resolved. It was duplicating conversations in jsonl files eating tokens, crashing my hardware and while trying to clean up the mess Claude Code made I noticed personal information in jsonl files where it had apparently scanned personal files. Then after I cleaned up huge duplicate files about 300MB opened Claude Code yesterday barely used it maybe an hour and it shut me down saying I had no time left. There are some massive bugs in Code that need to be addressed.

  11. Orfeasfil commented on Jan 12, 2026

    @Orfeasfil

    @claude this is frustrating

  12. 1 remaining item

  13. VicVibesPL commented on Jan 14, 2026

    @VicVibesPL

    @claude can you just ask claude code to fix it?

  14. H0w4rd commented on Jan 14, 2026

    @H0w4rd

    or maybe...I don't know... Gemini 3 can fix it :-) it's quite a shame that there is such a bug for a long time

  15. Krispheria commented on Jan 21, 2026

    @Krispheria

    +1

  16. blackwood821 commented on Jan 23, 2026

    @blackwood821

    This is happening to me as well for version 2.0.57 and above. If I downgrade to version 2.0.56 and below the past conversations load again.

  17. DaazKu commented on Jan 27, 2026

    @DaazKu

    On Mac the problem was permissions. The projects are created with permissions 0700.

    Changing to 0770 fixed the issue.
    So I could make it work by running find ~/.claude/projects -type d -exec chmod 0770 {} \;.

    Obviously this is a bandaid and fixing the root cause is still needed.

  18. thecherry94 commented on Feb 2, 2026

    @thecherry94

    @claude So are you guys eventually going to fix this issue or do you simply not care in the slightest? This is frustrating.

  19. melsintexas commented on Feb 2, 2026

    @melsintexas

    @claude So are you guys eventually going to fix this issue or do you simply not care in the slightest? This is frustrating.

    I wish I could show you the email correspondences with the amount of gaslighting they have given me over this issue, excessive token consumption, file storage, mangled files, security breaches(Claude Code accessed my personal files and put the information in jsonl files), hardware malfunction(BSOD) from excessive resource usage, no file cleanup mechanism after Code or Anthropic has created hundreds of erroneous files and folders that consume tokens and resources with no way of knowing which are important and the list goes on. Heads up, short of the fact they are very aware that conversation lengths are an issue, they have basically admitted all these problems are by design and well yes we've logged your complaint but hey here's the workaround for our poor design features.

    If anyone wants more information of the issues I've had and/or the feedback I've received, let me know. I'm happy to share.

  20. blackwood821 commented on Feb 2, 2026

    @blackwood821

    On Mac the problem was permissions. The projects are created with permissions 0700.

    Changing to 0770 fixed the issue. So I could make it work by running find ~/.claude/projects -type d -exec chmod 0770 {} \;.

    Obviously this is a bandaid and fixing the root cause is still needed.

    @DaazKu Thanks for the workaround. That worked for me.

  21. ccalvop commented on Feb 6, 2026

    @ccalvop

    Adding some related findings that might help debug this issue.

    I've been with a related problem (#13064 Past Conversations showing only recent sessions) and found that the VS Code dropdown reads from ~/.claude/projects/<project>/sessions-index.json, not directly from the .jsonl files.

    In my case:

    • 655 session .jsonl files exist on disk (all intact)
    • Only 65 entries in sessions-index.json
    • VS Code shows only what's in the index

    For those experiencing a completely empty Past Conversations list, I'd suggest checking:

    1. Does your sessions-index.json exist? If it's missing or corrupted, the UI has nothing to read.
    2. Check permissions on the file: ls -la ~/.claude/projects/<your-project>/sessions-index.json

    The chmod 0770 workaround from @DaazKu likely works because the VS Code extension process runs under a different effective user/group than the CLI, so it can't read the 0700 directories created by the CLI.

    This also explains why claude --resume works from terminal (same user, can read 0700) but VS Code can't.

  22. Ectropy commented on Mar 15, 2026

    @Ectropy

    Same issue present in Claude Code for VS Code v2.1.76

  23. markwhitehead commented on Apr 13, 2026

    @markwhitehead

    I threw Claude at this and sorted out a fix by patching the vs code extension JS. Works for me on Windows 11, hopefully it works for others.

    It adds a fallback path for history/session loading:

    • If the extension’s normal session index returns nothing, it reads session .jsonl files directly from ~/.claude/projects/<mapped-cwd>/.
    • If opening a specific session returns empty, it directly loads <sessionId>.jsonl.
    • It restores list titles from ai-title records (or first user text).
    • It filters loaded records to message types the UI can render.

    Patch file:
    ~/.vscode/extensions/anthropic.claude-code-2.1.101-win32-x64/extension.js

    Replace the entire listSessions() method with:

    async listSessions(){let K=this.cwd,V=await zd({dir:K,includeWorktrees:!1});if(V.length===0&&typeof K==="string"&&/^[a-z]:\\/.test(K)){let q=K[0].toUpperCase()+K.slice(1);if(q!==K){let z=await zd({dir:q,includeWorktrees:!1});z.length>0&&(this.logger.warn(`listSessions path-case fallback: ${K} -> ${q} (${z.length} sessions)`),K=q,V=z)}}let B=await g1.readTeleportMetadata(K,V.map((H)=>H.sessionId)),j=V.map((H)=>{let N=B.get(H.sessionId);return{id:H.sessionId,lastModified:H.lastModified,fileSize:H.fileSize,summary:H.summary,gitBranch:H.gitBranch,worktree:UR4(H.cwd),isCurrentWorkspace:!0,...N}});if(j.length===0)try{let q=require("os"),z=require("path"),U=require("fs"),Z=typeof K==="string"?K.replace(/[\\/:]/g,"-"):String(K),D=z.join(q.homedir(),".claude","projects"),L=z.join(D,Z),O=U.existsSync(L)?U.readdirSync(L).filter((F)=>F.endsWith(".jsonl")):[],N=O.map((F)=>{let M=z.join(L,F),A=U.statSync(M),w=F.replace(/\.jsonl$/,""),I=B.get(w),R=I?.summary;if(!R)try{let E=U.readFileSync(M,"utf8").split(/\r?\n/).filter((P)=>P.trim().length>0);for(let P of E){let T;try{T=JSON.parse(P)}catch{continue}if(T?.type==="ai-title"&&typeof T.aiTitle==="string"&&T.aiTitle.trim()){R=T.aiTitle.trim();break}if(!R&&T?.type==="user"){let h=T?.message?.content;if(Array.isArray(h)){let C=h.find((c)=>c?.type==="text"&&typeof c.text==="string"&&c.text.trim());if(C){R=C.text.trim(),R.length>70&&(R=R.slice(0,67)+"...")}}}}}catch{}return{id:w,lastModified:A.mtimeMs,fileSize:A.size,summary:R||w,gitBranch:I?.gitBranch,worktree:I?.worktree,isCurrentWorkspace:!0,...I}}),x=U.existsSync(L)?O.length:-1,G=U.existsSync(D)?U.readdirSync(D,{withFileTypes:!0}).filter((F)=>F.isDirectory()).map((F)=>F.name).slice(0,30):[];this.logger.warn(`listSessions debug cwd=${K} key=${Z} projectDir=${L} projectJsonl=${x} projectsRoot=${D} knownProjectDirs=${G.join(",")}`),N.length>0&&(this.logger.warn(`listSessions file fallback used: ${N.length} sessions from ${L}`),j=N)}catch(q){this.logger.warn(`listSessions debug failed: ${q}`)}ja(j);let Y=new Set(this.settings.getHiddenSessionIds()),X=Y.size>0?j.filter((H)=>!Y.has(H.id)):j;return X.length===0&&j.length>0&&(this.logger.warn(`listSessions fallback: hidden filter removed all sessions (cwd=${K}, total=${j.length}, hidden=${Y.size})`),X=j),this.logger.log(`listSessions cwd=${K} total=${j.length} hidden=${Y.size} returned=${X.length}`),{type:"list_sessions_response",sessions:X}}

    Replace the entire getSession(K) method with:

    async getSession(K){let V=this.cwd,B;try{B=await Ld(K,{dir:V})}catch(j){if(typeof V==="string"&&/^[a-z]:\\/.test(V)){let Y=V[0].toUpperCase()+V.slice(1);if(Y!==V)try{B=await Ld(K,{dir:Y}),this.logger.warn(`getSession path-case fallback: ${V} -> ${Y} (session=${K})`),V=Y}catch{}}if(!B)try{let Y=require("os"),X=require("path"),Q=require("fs"),G=(typeof V==="string"?V:String(V)).replace(/[\\/:]/g,"-"),q=X.join(Y.homedir(),".claude","projects",G,`${K}.jsonl`);if(Q.existsSync(q)){let z=Q.readFileSync(q,"utf8").split(/\r?\n/).filter((U)=>U.trim().length>0);B=[];for(let U of z)try{B.push(JSON.parse(U))}catch{}this.logger.warn(`getSession file fallback used: session=${K} file=${q} raw=${B.length}`)}}catch{}if(!B)throw j}if(!B||B.length===0)try{let Y=require("os"),X=require("path"),Q=require("fs"),G=(typeof V==="string"?V:String(V)).replace(/[\\/:]/g,"-"),q=X.join(Y.homedir(),".claude","projects",G,`${K}.jsonl`);if(Q.existsSync(q)){let z=Q.readFileSync(q,"utf8").split(/\r?\n/).filter((U)=>U.trim().length>0),U=[];for(let Z of z)try{U.push(JSON.parse(Z))}catch{}if(U.length>0)B=U,this.logger.warn(`getSession empty->file fallback used: session=${K} file=${q} raw=${B.length}`)}}catch{}let j;try{j=await(await g1.load(V,this.logger)).getSessionDiffs(K,V,B||[])}catch{j=void 0}let Y=(B||[]).filter((H)=>H?.type==="user"||H?.type==="assistant"||H?.type==="system"||H?.type==="meta"||H?.type==="compact");return this.logger.log(`getSession id=${K} raw=${(B||[]).length} filtered=${Y.length} cwd=${V}`),{type:"get_session_response",messages:Y,sessionDiffs:j}}

    Then run:

    • Developer: Reload Window or restart VS Code
  24. vranakis commented on Apr 17, 2026

    @vranakis

    This happened to me too and I noticed something that could be related.

    I found the .jsonl file inside .claude/projects/MyProject folder.

    The conversation that had the issue, was initiated with an --> image <-- directly, instead of the more common text question! Therefore instead of having a normal text as a title, this was a bit 'broken'. Perhaps that's why it wouldn't show up in the UI.

    I was able to recover my conversation using /resume --my-lost-conversation's-Id-- on the terminal.

  25. asheroto commented on May 11, 2026

    @asheroto

    Same issue here, still an active problem.

  26. spotlesscoder commented on Jun 28, 2026

    @spotlesscoder

    this is soo annoying ... just add the feature

  27. BasedGPT commented on Jun 28, 2026

    @BasedGPT

    Your CLI access still working while the sidebar shows nothing points to the data being intact. What's broken is the VS Code extension's session index rather than the sessions themselves.

    One check from further down this thread worth running first: look for sessions-index.json inside ~/.claude/projects/<your-project-path>/. ccalvob found that the extension reads sidebar listings from that file rather than directly from the .jsonl transcripts — if it's missing, corrupt, or much smaller than your transcript count, the sidebar has nothing to display even though the data is right there. On Mac a permissions fix (chmod 0770 on the project directories) resolved it; on Windows the equivalent is verifying the VS Code process has read access to ~/.claude/.

    I built a toolkit for the recovery side of this: recover_vscode_sessions.py in BasedGPT/claude-code-session-recovery reads your full transcript files and injects missing entries into the extension's workspace session cache. Run diagnose.py from the same toolkit first; it maps ~/.claude/projects/ against the extension's index and shows which sessions are present in the files but absent from the cache, before writing anything.

    Close VS Code fully before running recover_vscode_sessions.py --apply.

    Hope this helps, if my tools are able to help you, would appreciate a ⭐ :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:idebugSomething isn't workinghas reproHas detailed reproduction stepsplatform:windowsIssue specifically occurs on Windows

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions