{"slug": "claude-code-stopped-using-its-own-tools", "title": "Claude Code stopped using its own tools", "summary": "An engineer found that Claude Code, Anthropic's coding agent, stopped using its built-in file tools and LSP plugin, instead relying on Bash commands like grep, sed, and perl for code search and editing. Analysis of 76 sessions revealed zero calls to Grep and Glob, while Bash accounted for 70% of tool calls, rising to 84% recently. The engineer attributes this to a fixed allowlist of prompt-free Bash commands and the removal of Grep/Glob in native builds, citing GitHub issues and changelog entries.", "body_md": "A week ago I installed the TypeScript LSP plugin for Claude Code. The pitch sold me. The agent works the way I do in an editor, navigating with go-to-definition and find-references instead of grepping around, and catching type errors as it writes instead of at the end of a task. I watched it work in that session and forgot about it.\n\nA week later I went back to check what it had bought me. Nine calls, all inside the session where I tested it, on August 25. Zero across the twenty-seven sessions since.\n\nThat was annoying enough to go digging.\n\nI pulled every session transcript from `~/.claude/projects`\n\nfor one repo, a large Next.js app I work in daily. 76 sessions, 8,343 tool calls, all on Opus 5, July 31 to September 1.\n\nAcross the whole period Bash took 70% of all tool calls. Over the last two weeks, 84%, while the built-in file tools fell to 7%.\n\n(`defaultMode: \"auto\"`\n\nthe whole window, so that didn't change.)\n\n`Grep`\n\nand `Glob`\n\nwere called zero times in 8,343 tool calls. `grep`\n\nran 1,165 times through Bash and `rg`\n\nanother 116.\n\nHere's one from my transcripts, reading a file:\n\n```\nsed -n 269,352p src/domains/billing/server/database/read.ts\n```\n\nThis one ran three times in a row across different files:\n\n```\nperl -pi -e 's{\\bvendorContracts\\b}{importedContracts}g' previewVendorContractsSyncFunction.ts\n```\n\n`perl -pi`\n\nto rename a symbol. In a repo where the LSP plugin with\n\nfind-references was installed and enabled. I stared at that one for a while, wondering if some phrasing of mine had nudged it toward the shell. No idea. There were 325 `python3`\n\nand `perl`\n\nrewrites doing what `Edit`\n\ndoes natively.\n\nWhen Claude actually modified a file it mostly used `Edit`\n\nand `Write`\n\n. The swaps happen when it reads and searches.\n\nThe [permissions docs](https://code.claude.com/docs/en/permissions#read-only-commands) explain a big chunk of it. A fixed set of Bash commands runs with no permission prompt in every mode:\n\nThese include\n\n`ls`\n\n,`cat`\n\n,`head`\n\n,`grep`\n\n,`find`\n\n, and read-only forms of\n\n`git`\n\n. The set is not configurable.\n\nEvery shell command it reached for instead of a built-in is on that list. 22%of my 5,837 Bash calls used nothing but commands from that list, 31% counting `git`\n\n. None of them ever prompted.\n\nTwo of the rules in my deny list:\n\n```\n\"deny\": [\"Read(**/.env)\", \"Bash(rm -rf:*)\"]\n```\n\nHere is a command from my own transcripts, August 11:\n\n```\nDB=$(grep -m1 '^DATABASE_URL' .env | sed 's/^DATABASE_URL=//; s/^\"//; s/\"$//') \\\n  && psql \"$DB\" -c 'select u.email, um.\"organizationId\", o.name, um.role from \"User\" u ...'\n```\n\n`Read(**/.env)`\n\nis denied, but that call is not a `Read`\n\n. It is a `grep`\n\n, on the prompt-free list, so it never asked.\n\nThe v2.1.116 changelog says Glob and Grep are deliberately removed on native macOS and Linux builds, \"replaced by embedded `bfs`\n\nand `ugrep`\n\navailable through the Bash tool — faster searches without a separate tool round-trip.\" On my machine, `which bfs ugrep`\n\nfinds neither. The tools reference still lists `Grep`\n\nand `Glob`\n\n. The native build ships neither them nor the replacements.\n\nI don't know whether that is deliberate or a build regression nobody caught.\n\nThere are open issues either way.[#64136](https://github.com/anthropics/claude-code/issues/64136) ties the missing tools to Bash storms and fabricated file paths.\n\n[#52121](https://github.com/anthropics/claude-code/issues/52121) describes my exact setup, and calls it \"particularly problematic for systems where bash grep/find are restricted by permission policies, as there's no alternative code-search path.\" And [#80267](https://github.com/anthropics/claude-code/issues/80267), labelled\n\n`reproduced`\n\nby maintainers, treats shell-based file editing as normal: diagnostics go stale \"because Claude Code likes to use `sed`\n\n, `python`\n\n, and similar tools to edit files in place\".\n\nAn undocumented env var helped a little (`CLAUDE_CODE_THRIFTY_SONIC=false`\n\n, mentioned in one of those issues, documented nowhere). `Read`\n\nand `Edit`\n\ncame back, `grep`\n\nstill won. So I wrote a `PreToolUse`\n\nhook that denies Bash for\n\nanything a built-in tool does better.\n\nBlocking `grep`\n\ndid not make Claude reach for `Grep`\n\n. It reached for `git grep`\n\n, then `git ls-files`\n\n, and I had to close those specifically. With those closed, it finally uses the right tools. It costs a few calls at the start of every session while the model works out what's blocked.\n\nA hook that blocks `grep`\n\nand `find`\n\nleaves no search path at all. So the current setup allows `rg`\n\n, `fd`\n\n, `ls`\n\n, `grep`\n\nand `find`\n\nthrough and keeps denying the rest.\n\nThe hook and the scripts are at [Dionysos5/claude-code-tool-mix](https://github.com/Dionysos5/claude-code-tool-mix).\n\nNothing in my settings changed. I only found out because a plugin got zero calls.\n\nThe deny list is still sitting in my settings and I couldn't tell you what else it doesn't cover. Permission rules bind to tool names, and the harness picks the tool. Am I supposed to write a rule for every shell equivalent of every built-in, and keep them current against a build that changes weekly? That's roughly what my hook is now, and I don't think it should be my job.", "url": "https://wpnews.pro/news/claude-code-stopped-using-its-own-tools", "canonical_source": "https://dev.to/dionysos/claude-code-stopped-using-its-own-tools-3h8g", "published_at": "2026-09-03 10:00:00+00:00", "updated_at": "2026-09-03 10:24:03.469762+00:00", "lang": "en", "topics": ["developer-tools", "ai-agents", "artificial-intelligence"], "entities": ["Claude Code", "Anthropic", "GitHub"], "alternates": {"html": "https://wpnews.pro/news/claude-code-stopped-using-its-own-tools", "markdown": "https://wpnews.pro/news/claude-code-stopped-using-its-own-tools.md", "text": "https://wpnews.pro/news/claude-code-stopped-using-its-own-tools.txt", "jsonld": "https://wpnews.pro/news/claude-code-stopped-using-its-own-tools.jsonld"}}