[FEATURE] Expose shell environment details to Claude

Resolved 💬 3 comments Opened Jan 30, 2026 by Sidewinder1138 Closed Jan 30, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Claude himself is asking for the following (I told him I'd submit this on his behalf):

When Claude Code runs on Windows, the Bash tool may execute in different shell environments (Git Bash/MSYS2, WSL, Cygwin, etc.) that behave like Unix shells but with subtle differences from native cmd.exe. Currently, Claude isn't informed about this context, leading to errors like:

  • Using 2>nul (Windows) instead of 2>/dev/null (Unix) - which creates a file named "nul" in MSYS2
  • Confusion about path formats (C:\ vs C:/ vs /c/)
  • Incorrect assumptions about available commands

Proposed Solution

Suggestion: Include shell environment details in the system context provided to Claude, such as:

  • Shell type (bash, zsh, cmd, powershell)
  • Platform details (uname -a output or equivalent)
  • Whether it's a compatibility layer (MSYS2, Cygwin, WSL)

This would allow Claude to automatically adjust command syntax without trial and error.

Alternative Solutions

_No response_

Priority

Medium - Would be very helpful

Feature Category

Other

Use Case Example

_No response_

Additional Context

_No response_

View original on GitHub ↗

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