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

Resolved 💬 3 comments Opened Apr 9, 2026 by benf-innovatum Closed Jun 2, 2026

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

View original on GitHub ↗

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