[BUG] Auto mode system message instructs Claude to use Bash, even on Windows

Status Open
Reported on v2.1.161
Maintainer reply None cached
Activity 1 comment · opened Sep 6, 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?

Auto mode being enabled in the latest harness injects a system instruction to the model like so:

Do your work through the Bash tool wherever it can accomplish the job: read files with cat, head, or sed -n, search with grep and find, and make file changes with sed, heredocs, or short scripts, rather than using the dedicated Read, Edit, or Write tools. Fall back to a dedicated tool only when Bash genuinely cannot do the job.

This needs changing so it detects the platform and instructs to use PowerShell when on Windows by default.

What Should Happen?

This injection should not instruct to use Bash when on Windows with the PowerShell config env toggled to "1". This instruction overrides global CLAUDE.md instruction to use PowerShell. On Windows, the default shell should be PowerShell by default, even with auto mode toggled on.

Error Messages/Logs

Steps to Reproduce

Enable Auto mode on Windows. Ask for the prompt injected by the harness when this mode is enabled. See the default shell used by the model when this mode is enabled.

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.161

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗