claude-code - 💡(How to fix) Fix Grep and Glob tools missing entirely from registry under ENABLE_TOOL_SEARCH=true [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52121Fetched 2026-04-23 07:36:05
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Timeline (top)
labeled ×4subscribed ×2commented ×1

When ENABLE_TOOL_SEARCH=true is set, the built-in Grep and Glob tools disappear from the session entirely — they are neither preloaded as direct tools nor present in the deferred-tool list returned by ToolSearch. The documentation states tool search defers MCP tools, so built-ins like Grep/Glob should not be affected.

Root Cause

Docs state that when ANTHROPIC_BASE_URL points to a non-first-party host, tool search defaults to OFF because most proxies do not forward tool_reference blocks. Setting =true explicitly was intentional. Possible the registration bug is specific to the proxy path — happy to provide more diagnostic info if useful.

Fix Action

Workaround

Patched the redirect hook to honor a CLAUDE_DEGRADED_NATIVE_TOOLS=Grep,Glob env var that allows bash grep/find to fall through when the named native tools are unavailable. Works, but masks a real registration bug.

RAW_BUFFERClick to expand / collapse

Summary

When ENABLE_TOOL_SEARCH=true is set, the built-in Grep and Glob tools disappear from the session entirely — they are neither preloaded as direct tools nor present in the deferred-tool list returned by ToolSearch. The documentation states tool search defers MCP tools, so built-ins like Grep/Glob should not be affected.

Environment

  • Claude Code: 2.1.117
  • Node: v24.10.0
  • macOS: 26.4.1 (build 25E253)
  • Model: Opus 4.7 (claude-opus-4-7)
  • Provider: Vertex via a non-first-party AI gateway proxy
  • ENABLE_TOOL_SEARCH=true set in ~/.claude/settings.json env block
  • Permissions explicitly allow Grep and Glob (both in user settings and marketplace-managed permissions)

Repro

  1. Set ENABLE_TOOL_SEARCH=true in ~/.claude/settings.json env field.
  2. Start a fresh Claude Code session against an Anthropic-compatible proxy.
  3. Inspect the available tools (top-level) — Grep and Glob are absent.
  4. Call ToolSearch with query: "select:Grep,Glob" — returns no results.
  5. Call ToolSearch with broad keywords like grep, glob, search files — they are not in the deferred-tool list at all.

Expected

Per the docs, tool search defers MCP tools on demand. Built-in tools (Grep, Glob, Read, Edit, Write, Bash, etc.) should remain available — either preloaded or at minimum discoverable via ToolSearch.

Actual

Read, Edit, Write, Bash, Agent, Skill, ToolSearch are preloaded. AskUserQuestion, WebFetch, WebSearch, NotebookEdit, etc. show up in the deferred list. Grep and Glob are in neither list. They cannot be invoked at all.

This also affects subagents (e.g. Explore) launched from the parent — they inherit the same gap.

Impact

This collides with ~/.claude/hooks/ setups that block bash grep/find and redirect users to Grep/Glob. Result: no path to filesystem search at all without a manual workaround.

Workaround

Patched the redirect hook to honor a CLAUDE_DEGRADED_NATIVE_TOOLS=Grep,Glob env var that allows bash grep/find to fall through when the named native tools are unavailable. Works, but masks a real registration bug.

Note on proxy default

Docs state that when ANTHROPIC_BASE_URL points to a non-first-party host, tool search defaults to OFF because most proxies do not forward tool_reference blocks. Setting =true explicitly was intentional. Possible the registration bug is specific to the proxy path — happy to provide more diagnostic info if useful.

extent analysis

TL;DR

The issue can be mitigated by setting CLAUDE_DEGRADED_NATIVE_TOOLS=Grep,Glob to allow bash grep/find as a fallback when the native Grep and Glob tools are unavailable.

Guidance

  • Verify that the ENABLE_TOOL_SEARCH=true setting is correctly applied and that the Claude Code version 2.1.117 is compatible with this feature.
  • Investigate the registration process for built-in tools like Grep and Glob to identify why they are not being preloaded or included in the deferred-tool list returned by ToolSearch.
  • Test the issue with a first-party AI gateway proxy to determine if the problem is specific to the non-first-party proxy being used.
  • Consider providing additional diagnostic information to help resolve the underlying registration bug.

Example

No code snippet is provided as the issue seems to be related to configuration and tool registration rather than a specific code problem.

Notes

The workaround provided in the issue description, using CLAUDE_DEGRADED_NATIVE_TOOLS=Grep,Glob, may mask the underlying issue but does not resolve the root cause of the problem. Further investigation is needed to determine why Grep and Glob are not being registered correctly.

Recommendation

Apply the workaround by setting CLAUDE_DEGRADED_NATIVE_TOOLS=Grep,Glob to ensure that users have access to some form of filesystem search functionality while the underlying issue is being investigated.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Grep and Glob tools missing entirely from registry under ENABLE_TOOL_SEARCH=true [1 comments, 2 participants]