Preflight Checklist
Type of Behavior Issue
Claude ignored my instructions or configuration
What You Asked Claude to Do
Use dedicated tools (Read, Grep, Glob, Edit, Write) instead of Bash equivalents, as specified in the system prompt.
What Claude Actually Did
The system prompt contains explicit instructions:
Do NOT use the Bash to run commands when a relevant dedicated tool is provided.
- To read files use Read instead of cat, head, tail, or sed
- To edit files use Edit instead of sed or awk
- To search for files use Glob instead of find or ls
- To search the content of files, use Grep instead of grep or rg
Despite this, Claude Code routinely:
- Runs
cat file.cpp | head -50 instead of Read(file, limit=50)
- Runs
grep -r "pattern" src/ instead of Grep("pattern", "src/")
- Runs
find . -name "*.h" instead of Glob("**/*.h")
- Runs
sed -i 's/old/new/' file instead of using Edit
Reproduction
This happens in virtually every session longer than 30 minutes. It's especially common:
- After context compaction — the dedicated-tool preference gets compressed away
- In subagents — spawned agents seem to have weaker adherence to system prompt rules
- When the model is "thinking fast" — quick one-off lookups default to Bash
Why This Matters
- Bash output is verbose and wastes tokens —
cat dumps raw content without line numbers; Read provides structured output
- Bypasses tool UX — dedicated tools show the user what's being read/searched; Bash calls are opaque
- Breaks permission model — users configure tool-level permissions; Bash bypasses these
- The system prompt already prohibits this — the model is violating its own instructions
Evidence
Over 200+ sessions on a large C++ codebase (TrinityCore fork, ~2M LOC), this happens in roughly 40% of sessions. The CLAUDE.md reinforces the system prompt with additional rules, and we still see the model reach for cat and grep regularly.
Environment
- Claude Code v2.1.85
- Opus 4.6
- Windows 11 Pro
- Platform: CLI (bash shell)
Cross-References
Preflight Checklist
Type of Behavior Issue
Claude ignored my instructions or configuration
What You Asked Claude to Do
Use dedicated tools (Read, Grep, Glob, Edit, Write) instead of Bash equivalents, as specified in the system prompt.
What Claude Actually Did
The system prompt contains explicit instructions:
Despite this, Claude Code routinely:
cat file.cpp | head -50instead ofRead(file, limit=50)grep -r "pattern" src/instead ofGrep("pattern", "src/")find . -name "*.h"instead ofGlob("**/*.h")sed -i 's/old/new/' fileinstead of using EditReproduction
This happens in virtually every session longer than 30 minutes. It's especially common:
Why This Matters
catdumps raw content without line numbers; Read provides structured outputEvidence
Over 200+ sessions on a large C++ codebase (TrinityCore fork, ~2M LOC), this happens in roughly 40% of sessions. The CLAUDE.md reinforces the system prompt with additional rules, and we still see the model reach for
catandgrepregularly.Environment
Cross-References