[BUG] Grep and Glob Tools Unusable
Resolved 💬 2 comments Opened May 29, 2026 by jjcfatras Closed Jun 2, 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?
For me ToolSearch always fails to load these tools. I tried forcing them to be loaded via disabling ENABLE_TOOL_SEARCH, but doing this just breaks them entirely.
What Should Happen?
The Grep and Glob tools should be available and used instead of abusing the Bash tool.
Error Messages/Logs
{"parentUuid":"f0d9b410-61ee-4670-99e9-f7c5f1d2b951","isSidechain":false,"message":{"model":"claude-opus-4-8","id":"msg_01NckFKqr9vCVbpBhQiTMAD8","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01Ry5GyNBsWNHDAhHUGvGpvz","name":"Grep","input":{"pattern":"ENABLE_TOOL_SEARCH","path":"/Users/jfatras/.claude","output_mode":"content","-n":"true","-i":"true"},"caller":{"type":"direct"}}],"stop_reason":"tool_use","stop_sequence":null,"stop_details":null,"usage":{"input_tokens":9467,"cache_creation_input_tokens":15053,"cache_read_input_tokens":0,"output_tokens":565,"server_tool_use":{"web_search_requests":0,"web_fetch_requests":0},"service_tier":"standard","cache_creation":{"ephemeral_1h_input_tokens":15053,"ephemeral_5m_input_tokens":0},"inference_geo":"not_available","iterations":[{"input_tokens":9467,"output_tokens":565,"cache_read_input_tokens":0,"cache_creation_input_tokens":15053,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":15053},"type":"message"}],"speed":"standard"},"diagnostics":null},"requestId":"req_011CbXKHDWy4XRWU1QQrgQCa","type":"assistant","uuid":"7a886956-b940-45e8-846a-c754c181f30c","timestamp":"2026-05-29T18:15:13.474Z","userType":"external","entrypoint":"cli","cwd":"/Users/jfatras","sessionId":"f638faaa-ebde-4d64-b9ff-2bad128edcbc","version":"2.1.156","gitBranch":"HEAD"}
{"parentUuid":"7a886956-b940-45e8-846a-c754c181f30c","isSidechain":false,"promptId":"54f7d800-b7de-4f41-8f98-f143a1b66889","type":"user","message":{"role":"user","content":[{"type":"tool_result","content":"<tool_use_error>Error: No such tool available: Grep</tool_use_error>","is_error":true,"tool_use_id":"toolu_01Ry5GyNBsWNHDAhHUGvGpvz"}]},"uuid":"db29e517-c3db-4ee2-aa2d-a7c3a40d2638","timestamp":"2026-05-29T18:15:13.479Z","toolUseResult":"Error: No such tool available: Grep","sourceToolAssistantUUID":"7a886956-b940-45e8-846a-c754c181f30c","userType":"external","entrypoint":"cli","cwd":"/Users/jfatras","sessionId":"f638faaa-ebde-4d64-b9ff-2bad128edcbc","version":"2.1.156","gitBranch":"HEAD"}
{"parentUuid":"db29e517-c3db-4ee2-aa2d-a7c3a40d2638","isSidechain":false,"message":{"model":"claude-opus-4-8","id":"msg_01NckFKqr9vCVbpBhQiTMAD8","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_014viHL1PbKgWyBMvHRNDTf1","name":"Grep","input":{"pattern":"TOOL_SEARCH","path":"/Users/jfatras","output_mode":"content","-n":"true","-i":"true","glob":"*.json"},"caller":{"type":"direct"}}],"stop_reason":"tool_use","stop_sequence":null,"stop_details":null,"usage":{"input_tokens":9467,"cache_creation_input_tokens":15053,"cache_read_input_tokens":0,"output_tokens":565,"server_tool_use":{"web_search_requests":0,"web_fetch_requests":0},"service_tier":"standard","cache_creation":{"ephemeral_1h_input_tokens":15053,"ephemeral_5m_input_tokens":0},"inference_geo":"not_available","iterations":[{"input_tokens":9467,"output_tokens":565,"cache_read_input_tokens":0,"cache_creation_input_tokens":15053,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":15053},"type":"message"}],"speed":"standard"},"diagnostics":null},"requestId":"req_011CbXKHDWy4XRWU1QQrgQCa","type":"assistant","uuid":"b334ebbd-07c4-4235-9092-30f1d0fdf73b","timestamp":"2026-05-29T18:15:14.570Z","userType":"external","entrypoint":"cli","cwd":"/Users/jfatras","sessionId":"f638faaa-ebde-4d64-b9ff-2bad128edcbc","version":"2.1.156","gitBranch":"HEAD"}
{"parentUuid":"b334ebbd-07c4-4235-9092-30f1d0fdf73b","isSidechain":false,"promptId":"54f7d800-b7de-4f41-8f98-f143a1b66889","type":"user","message":{"role":"user","content":[{"type":"tool_result","content":"<tool_use_error>Error: No such tool available: Grep</tool_use_error>","is_error":true,"tool_use_id":"toolu_014viHL1PbKgWyBMvHRNDTf1"}]},"uuid":"7a27820e-3c1c-4948-b9e0-eb40d7f3323f","timestamp":"2026-05-29T18:15:14.570Z","toolUseResult":"Error:
Steps to Reproduce
Add the following to your user level CLAUDE.md and attempt a search:
### Search and File Discovery
Prefer dedicated tools over `Bash` for read-only inspection:
- **Content search** — use `Grep` (never `grep`/`rg` via Bash). `Grep` is ripgrep with correct permissions, glob filtering, and structured output modes.
- **File/path discovery** — use `Glob` (never `find`/`ls` via Bash). `Glob` returns matches sorted by modification time.
- **File reads** — use `Read` (never `cat`/`head`/`tail` via Bash).
Reserve `Bash` for operations that genuinely require a shell: git, process management, build/test runners, package managers, scripts. Using `Bash` for `grep`/`find`/`cat` triggers unnecessary permission prompts and produces worse output than the dedicated tools.
Claude Model
Opus
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.156
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
The terminal being used is Ghostty.
<img width="1762" height="1153" alt="Image" src="https://github.com/user-attachments/assets/1a750c47-6d24-473f-9888-e2b64ace9446" />
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗