[BUG] Claude abuses bash tools for reads, writes, and edits when running in Auto Mode
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?
After updating to the latest version, I started noticing that Claude no longer used the Read tool for reads and instead favored using sed and cat for reading files in Claude Code VSCode Plugin chat sessions. I asked it why it was doing that and it reported that it received this instruction straight from the harness:
While auto mode is active: 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.
As far as I can tell, this is relatively new behavior and breaks the built-in caching that you get from the dedicated Read tool.
This also impacts the way it does edits. Rather than just using the Write and Edit tools like it used to, it tries to craft elaborate scripts to do trivial edits and wastes a lot of tokens in doing this. I've had to stop it multiple times and tell it to use the Edit tool instead of bash scripts.
What Should Happen?
- Claude should favor the
Readtool over bash commands to maximize cache hits for files already read in a given session. - Claude should use the
EditandWritetools for trivial edits instead of crafting overly elaborate bash scripts to do the same edits
Error Messages/Logs
Steps to Reproduce
- Start a new chat session
- Set the mode to Auto Mode
- Prompt Claude to take a look at a file and make some trivial edits
Expected:
- Claude uses the
Readtool when reading files for the duration of the session and only falls back tosedfor genuinely large files - Claude uses the
EditandWritetools when writing to files for trivial edits
Actual:
- Claude abuses
sed,cat, and other bash tools for reads - Claude tries to craft bash scripts for what seem like trivial edits
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.235
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
_No response_
Showing cached comments. Read the full discussion on GitHub ↗
5 Comments
I've noticed this issue too recently, Claude even told me so too:
<img width="921" height="65" alt="Image" src="https://github.com/user-attachments/assets/12cfc512-5a53-443e-bbed-6205b4ba5239" />
This should not be the standard. It makes following along very difficult (or even after the fact, checking what it did by scrolling up).
Claude Code v2.1.236
On WSL2 / Ubuntu
Yeah, we've had to add this instruction to our enterprise managed settings and roll it out to all the engineers as a work around until this is fixed:
It introduced some real copy errors for me because of how much it botched using tools in bash to edit things.
This is apparently an intended change in Claude's system prompt, see the discussion here: https://www.reddit.com/r/ClaudeCode/comments/1vruj7h/psa_claude_will_now_use_bash_instead_of/ .
The real critical-level problem of this change (whether I'm right and it was intended, or not) is that, of course, Claude will sometimes mess up the (overly convoluted) scripts for simple file edits. And that can incur data loss. I already experienced it once - half of my document was deleted due to a bug in
sedshenanigans Claude invented for a simple couple-of-lines insertion (luckily for me, in this particular case, the document was recoverable).Auto mode classifier can only judge what's _safe_, not what's _correct_. Unfortunately this system prompt change turns auto mode into slop mode.
For someone who steers Claude a lot throughout a session, this essentially removes the steering wheel. You can no longer say, "We’re going the wrong way". Instead, you have to let Claude arrive at the wrong destination, then restart the navigation from there.
Sometimes (when the final change is small and readable) I actually prefer this behavior. But for larger changes it does the opposite of what auto mode is supposed to achieve - it wastes hours of my time and unnecessarily stretches out Claude sessions.