[BUG] claude -r fails on Windows due to case-sensitive path comparison on case-insensitive filesystem

Resolved 💬 3 comments Opened Apr 15, 2026 by TuckyDog Closed Apr 18, 2026

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?

Environment: - OS: Windows 11

  • Shell: PowerShell 5.1 (conhost) - Claude Code CLI

Description:

claude -r reports "This conversation is from a different directory" even when the user is in the correct directory.
Root cause is a case-sensitive string comparison between the stored session path and the current working directory
path. On Windows, NTFS is case-insensitive — C:\users\Tucker\CWD and C:\Users\Tucker\CWD are the same path, but Claude
Code treats them as different.

Steps to reproduce:

  1. Start a session in a directory where the path contains mixed case (e.g., C:\Users\Tucker\CWD)
  2. Close and reopen the terminal — path may resolve with different casing
  3. Run claude -r
  4. Claude reports wrong directory despite being in the correct location

Secondary defect:

The generated resume command uses && for command chaining (cd '...' && claude --resume <id>). && is not valid in
PowerShell 5.1. The command fails immediately on copy-paste, which is its only intended use.

Expected behavior:

  • Path comparison should be case-insensitive on Windows
  • Generated resume command should use PowerShell-compatible syntax (; instead of &&) when running in a PowerShell

context

What Should Happen?

Expected behavior:

  • Path comparison should be case-insensitive on Windows
  • Generated resume command should use PowerShell-compatible syntax (; instead of &&) when running in a PowerShell

context

Error Messages/Logs

Steps to Reproduce

Steps to reproduce:

  1. Start a session in a directory where the path contains mixed case (e.g., C:\Users\Tucker\CWD)
  2. Close and reopen the terminal — path may resolve with different casing
  3. Run claude -r
  4. Claude reports wrong directory despite being in the correct location

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.105 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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