[BUG] VSCode Remote-WSL: inconsistent session persistence — some sessions create ssh-* backup on Windows NTFS, others write only to WSL ext4

Resolved 💬 3 comments Opened Mar 28, 2026 by easykawa Closed Apr 29, 2026

Environment

  • Windows 11, WSL2 (Ubuntu 24.04)
  • VSCode Remote-WSL
  • Claude Code VSCode extension

Problem

Sessions opened via VSCode Remote-WSL have inconsistent persistence behavior:

  • Some sessions create an ssh-{sessionId} folder in C:\Users\{user}\.claude\projects\ with a .jsonl copy on Windows NTFS — these survive WSL crashes
  • Other sessions write .jsonl ONLY to ~/.claude/projects/ inside WSL ext4 — these are lost on power outage / WSL crash

Evidence

  • MCP logs in ~/.cache/claude-cli-nodejs/ confirm 5+ active Claude Code sessions on 2026-03-28 (timestamps: 04:12, 04:46–05:02, 11:09, 17:13–17:16 UTC)
  • Only 2 sessions created ssh-* folders on Windows NTFS
  • After power outage, only those 2 + the newly created session survived (3 total out of 5+)
  • 7 git commits with Co-Authored-By: Claude on the same day confirm the lost sessions existed and were productive

Storage locations observed

| Location | Filesystem | Survives WSL crash | Sessions found |
|----------|-----------|-------------------|----------------|
| ~/.claude/projects/{project}/ (WSL) | ext4 (virtual disk) | ❌ No | 3 (post-crash) |
| C:\Users\{user}\.claude\projects\ssh-{id}\ (Windows) | NTFS | ✅ Yes | 2 |
| ~/.cache/claude-cli-nodejs/.../mcp-logs-* (WSL) | ext4 | Partial (small files) | 5+ session timestamps |

Expected behavior

ALL sessions opened via VSCode Remote-WSL should either:

  1. Create ssh-* backup on Windows NTFS consistently, or
  2. Use fsync() after writing to ensure WSL ext4 persistence, or
  3. Write session data to Windows NTFS by default when running in Remote-WSL context

Related issues

  • #15330 — VSCode Remote-WSL: Chat session not persisted after Reload Window
  • #9258 — History Sessions lost in VSCode plugin

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗