Skip to content

[BUG] Claude Code attempts to access Windows paths with WSL-style /mnt/c/ prefix on native Windows #9580

Description

@rweijnen

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Environment

  • Claude Code Version: 2.0.15
  • Platform: Windows (native, not WSL)
  • OS Version: win11 24H2

Description

Claude Code is suddenly attempting to access Windows filesystem paths using WSL/Linux-style mount point syntax (/mnt/c/...) instead of native Windows paths (C:\...) when running on native Windows. This worked fine until recently.

Actual Behavior

Claude Code attempts to execute commands like:

grep -i "pattern" "/mnt/c/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/um/AppxPackaging.h"

Instead of using the correct Windows path:

C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\AppxPackaging.h

Impact

  • File access fails because /mnt/c/ paths don't exist on native Windows
  • Commands that should work with Windows filesystem fail
  • User workflow is interrupted

Additional Context

The /mnt/c/ prefix is specific to Windows Subsystem for Linux (WSL) where Windows drives are mounted under /mnt/. This should not be used when Claude Code is running on native Windows outside of WSL.

Possible Root Cause

Claude Code may be incorrectly detecting the platform or defaulting to WSL-style paths regardless of the actual execution environment.RetryClaude can make mistakes. Please double-check responses. Sonnet 4.5

What Should Happen?

When running on native Windows, Claude Code should:

  • Use native Windows path syntax (C:\...)
  • Use Windows-compatible commands (PowerShell, cmd) or properly handle path translation if using bash-like tools

Error Messages/Logs

Steps to Reproduce

  1. Run Claude Code on native Windows (not in WSL)
  2. Request Claude to access a file in a typical Windows location (e.g., C:\Program Files (x86)\Windows Kits\10\Include\...)
  3. Observe that Claude attempts to use bash commands with /mnt/c/ path prefix

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.0.15

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:toolsbugSomething 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