Skip to content

WSL sessions: Claude does not auto-resume on restore #122

Description

@AThraen

Shipped as a known gap in #121 (WSL sessions) and documented under WSL Sessions → Known gaps in CLAUDE.md.

What happens

AppSettings.AutoResumeClaude appends --resume <sessionId> when restoring a Claude session, so the prior conversation is picked up. That path is skipped entirely for SessionKind.Wsl: MainWindow.LaunchSessionAsync only applies auto-resume in the Local branch, and ClaudeSessionService.GetLastSessionId reads ~/.claude/projects/ on the Windows side.

A Claude Code session running inside WSL keeps its history in the distro's ~/.claude, which the Windows lookup never sees. So restoring a WSL Claude session starts a fresh conversation every time, silently.

This matters more than the "known gap" framing suggests: running Claude Code inside WSL is one of the main reasons to want WSL sessions at all.

Why it wasn't done in #121

The lookup needs to run inside the distro (or read through \wsl$\<distro>\home\<user>\.claude\projects), and the project-path keys under projects/ are derived from the Linux working folder, not the UNC mirror. That's a distinct piece of work from the launcher hardening #121 covered.

Sketch

  • Resolve the session-id lookup per kind rather than assuming Windows paths.
  • For WSL, either read via the \wsl$ mirror using the Linux path as the key, or shell out (wsl.exe -d <distro> -e sh -c …) and reuse the existing cached-probe shape in WslDiscoveryService.
  • Honour the same AutoResumeClaude setting and the OutputIndexer.SkipUntil behaviour the Local branch already applies.

Verify

Start a WSL session running claude, hold a short conversation, restart the app with auto-restore on, and confirm the conversation resumes rather than starting fresh.

Activity

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions