Skip to content

Claude defaults to bash/Unix syntax on Windows instead of PowerShell #45831

Description

@benf-innovatum

Even when Claude Code is running on Windows and the platform is clearly identified as win32, the Claude model defaults to bash/Unix syntax for shell commands and Unix-style filesystem paths. This results in commands that don't work in PowerShell or CMD, and repeated failed attempts before the correct syntax is used.

Examples observed:

  • Using /usr/local/bin/, /dev/null, and similar Unix paths on Windows
  • Writing shell commands with bash syntax (heredocs, backtick substitution) instead of PowerShell equivalents
  • Repeatedly retrying Bash tool calls after failures instead of adapting to the Windows environment

Expected: When the platform is win32, Claude should default to PowerShell-compatible syntax for shell commands and Windows-style paths, and should recognise when the Bash tool is unavailable and adapt accordingly.

Environment: Windows 10 Pro, Claude Code native

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions