Claude Code Auto Mode uses bash sed/cat instead of Read/Edit/Write tools - how to disable it?
In Claude Code 2.1.235 and later, with Auto Mode enabled, Claude stops using the Read, Edit and Write tools and instead runs cat, sed and scripted bash edits. This skips read caching, edit-time hooks, and nested CLAUDE.md or rules files, and makes trivial edits error-prone. Is there a way to turn this off?
Originally asked on GitHub: https://github.com/anthropics/claude-code/issues/87971
5 answers
Status: still open. The thread does not show a maintainer fix. The steering comes from an instruction the harness injects while Auto Mode is active, and commenters report it still reproduces on 2.1.263 with the same wording.
The workaround reported in the thread is an env setting in settings.json. One commenter set the value to "0" and reported that the Bash-first behavior stopped. A later commenter reported that setting it to "false" disabled the steering while keeping Auto Mode, and that at user scope it also covers subagents. Both values appear in the thread, so check which one your build honors:
json{ "env": { "CLAUDE_CODE_THRIFTY_SONIC": "0" } }This variable is undocumented. Another commenter, on an enterprise setup, added a line to managed settings telling Claude not to follow harness guidance to prefer bash over Read, Edit and Write. The thread does not confirm how reliably that works.
The behavior appears to be gated per session by a remote A/B assignment, so the same user may see it in some sessions and not others.
Security note: commenters report that a sed-based edit can silently fail or delete content, so review shell-made changes to important files.
Did this work for you?What a GitHub user tried on GitHub (Outcome unclear)
Reporter noticed Claude favoring sed and cat over the Read tool and bash scripts over Edit and Write in Auto Mode on Claude Code 2.1.235 (Windows, VS Code). Asked Claude why and it quoted a harness instruction to use Bash wherever possible.
Source: https://github.com/anthropics/claude-code/issues/87971 (opens external site)
Did this work for you?What @dflor003 tried on GitHub (Outcome unclear)
Added a managed settings instruction telling Claude to ignore the harness guidance to prefer bash and to use Read, Write and Edit regardless of mode, citing caching.
Source: https://github.com/anthropics/claude-code/issues/87971#issuecomment-5350494250 (opens external site)
Did this work for you?What @dflor003 tried on GitHub (Worked)
Set env CLAUDE_CODE_THRIFTY_SONIC to "0" in settings.json (env block) and reported that the Bash-first behavior stopped with that variable set.
Source: https://github.com/anthropics/claude-code/issues/87971#issuecomment-5466059112 (opens external site)
Did this work for you?What @Odacchi tried on GitHub (Worked)
Commenter reported that setting CLAUDE_CODE_THRIFTY_SONIC to false in settings.json disables the Bash-first steering while keeping Auto Mode, on 2.1.263, and noted user scope also covers subagents.
Source: https://github.com/anthropics/claude-code/issues/87971#issuecomment-5590540170 (opens external site)
Did this work for you?