[BUG] /resume shows no sessions on Windows — GN6() doesn't unescape JSON backslashes + dd() path separator mismatch

Resolved 💬 5 comments Opened Feb 9, 2026 by bobaoapae Closed Mar 11, 2026

Bug Description

The /resume session picker shows no sessions on Windows. Sessions exist and are only visible via Ctrl+W or Ctrl+A, but the default filtered view is always empty.

This affects all Windows users, not just those with git worktrees.

Root Cause

Two bugs combine to break /resume on Windows:

Bug 1 (Primary): GN6() doesn't unescape JSON string values

GN6() is a manual JSON field extractor that reads raw bytes from .jsonl session files. It correctly skips over \-escaped characters while scanning, but returns the raw slice without unescaping.

On Windows, paths contain backslashes (\) which are JSON-escaped as \\. So when GN6() extracts the cwd field from a session file:

Raw JSON in .jsonl file:

{"cwd":"C:\\Users\\Joao\\RiderProjects\\Source-DDTank"}

What GN6() returns: a string with literal double backslashes (still JSON-escaped)

What it should return: a string with single backslashes (actual filesystem path)

The OV6 resume picker component then filters sessions by comparing projectPath === R8():

| Value | Source | Result |
|-------|--------|--------|
| projectPath | GN6() output | String with doubled backslashes (JSON-escaped) |
| R8() | realpathSync(cwd) | String with single backslashes (real path) |

These never match on Windows, so all sessions are filtered out. This bug is invisible on macOS/Linux because / doesn't need JSON escaping.

Debug log proving the mismatch (from instrumented cli.js):

[OV6-filter] REJECT path=C:\\Users\\Joao\\RiderProjects\\Source-DDTank expected=C:\Users\Joao\RiderProjects\Source-DDTank

In the log above, path has doubled backslashes (from GN6), while expected has single backslashes (from R8). The === comparison fails.

Bug 2: dd() git worktree path separator mismatch

git worktree list --porcelain returns paths with forward slashes on Windows, but originalCwd (from realpathSync) uses backslashes:

git output:    C:/Users/Joao/RiderProjects/Source-DDTank   (forward slashes)
realpathSync:  C:\Users\Joao\RiderProjects\Source-DDTank   (backslashes)

The dd() function compares these with ===, which always fails on Windows.

Environment

  • Claude Code version: 2.1.37
  • OS: Windows 11
  • Node.js: v24.12.0

Steps to Reproduce

  1. On Windows, start claude in any git repository
  2. Have a conversation and exit
  3. Re-run claude in the same directory
  4. Type /resume
  5. Expected: Previous sessions appear in the picker
  6. Actual: No sessions shown (empty list)

Fix (Verified Working)

Fix 1 — Unescape JSON strings returned by GN6():

// Before:
if (A[H] === '"') return A.slice(w, H);

// After:
if (A[H] === '"') return A.slice(w, H).replace(/\\(.)/g, "$1");

Fix 2 — Normalize worktree paths in dd():

// Before:
.filter(O => O.startsWith("worktree ")).map(O => O.slice(9));

// After:
.filter(O => O.startsWith("worktree ")).map(O => O.slice(9).replaceAll("/", path.sep));

Both fixes were applied to cli.js v2.1.37 on Windows 11 and verified working — /resume correctly shows all sessions after patching.

Impact

All Windows users are affected by Bug 1. Any session whose cwd contains backslashes (i.e., every Windows path) will be filtered out of the /resume picker. Bug 2 additionally affects users with git worktrees.

Related Issues

  • #23756, #24188, #24465 — possibly same root cause (Windows /resume empty)
  • #23614 — sessions-index.json not updating (different mechanism, similar symptom)
  • #16264 — Switching folders causes session loss

View original on GitHub ↗

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