Grep and Glob tools missing entirely from registry under ENABLE_TOOL_SEARCH=true
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(build25E253) - Model: Opus 4.7 (
claude-opus-4-7) - Provider: Vertex via a non-first-party AI gateway proxy
ENABLE_TOOL_SEARCH=trueset in~/.claude/settings.jsonenv block- Permissions explicitly allow
GrepandGlob(both in user settings and marketplace-managed permissions)
Repro
- Set
ENABLE_TOOL_SEARCH=truein~/.claude/settings.jsonenv field. - Start a fresh Claude Code session against an Anthropic-compatible proxy.
- Inspect the available tools (top-level) —
GrepandGlobare absent. - Call
ToolSearchwithquery: "select:Grep,Glob"— returns no results. - Call
ToolSearchwith broad keywords likegrep,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.
23 Comments
I am also experiencing a similar issue. The agent does not have access to a number of core built-in tools without using
ToolSearchfirst.Summary
The
ENABLE_TOOL_SEARCHfeature (defaulttrue) — documented under MCP configuration — defers schema loading for first-party Claude Code tools, not just tools provided by MCP servers. This forces the model to make an extraToolSearchround-trip before it can invoke core harness functionality like plan mode, task tracking, or web fetch.Expected behavior
Based on naming and documentation location (under "MCP"),
ENABLE_TOOL_SEARCHshould apply only to MCP server tools, where user-installed integrations can balloon the tool-schema footprint. First-party tools that are part of the Claude Code surface (plan mode, tasks, web fetch, LSP, etc.) should always be eagerly loaded so the model can use them without a fetch round-trip.Actual behavior
The following first-party tools are deferred by default and appear only by name in a
<system-reminder>untilToolSearchis invoked to fetch their schemas:EnterPlanMode,ExitPlanModeAskUserQuestionTaskCreate,TaskGet,TaskList,TaskOutput,TaskStop,TaskUpdateWebFetch,WebSearchLSPNotebookEditMonitorCronCreate,CronDelete,CronListPushNotification,RemoteTriggerEnterWorktree,ExitWorktreeConcrete symptom
In an Opus 4.7 session, the user asked the model to "enter plan mode and create a plan." The model could not call
EnterPlanModeon the first attempt because its schema was not in context — it had to callToolSearchwithselect:EnterPlanModefirst to fetch it. This is an unnecessary round-trip for a core harness feature that has no substitute, and it is easy to miss:ExitPlanModealone doesn't enter plan mode, so a model that fetches onlyExitPlanModeends up with a confusing "not in plan mode" error and has to fetch again.Environment
ENABLE_TOOL_SEARCH: unset (defaulttrue)Workaround
Set
ENABLE_TOOL_SEARCH=false(as an env var, or in~/.claude/settings.jsonunderenv) to force eager loading of all tool schemas. This works but defeats the token-saving benefit for users with many MCP servers installed.Also affected on macOS desktop app, 2.1.116 CLI works fine after downgrading but app does not. Symptom matches #52004 eight-tool fingerprint exactly.
Still reproduces in 2.1.126 (latest as of 2026-05-01) with default settings (
ENABLE_TOOL_SEARCHunset). Tested on macOS, native install, both Sonnet 4.6 and Opus 4.7 — model makes no difference, tool palette is fixed at session start by the harness. Glob and Grep absent from both base palette and deferred registry.Reproduces on 2.1.126, macOS arm64 native, default settings.
GlobandGrepabsent from the base palette and fromToolSearch's deferred registry. Same ingeneral-purpose/Exploresubagents — not asymmetric.ENABLE_TOOL_SEARCH=falsedoes not resolve it here. Tested with=falseset in~/.claude/settings.json, restarted; verified on 2.1.126 (latest) and 2.1.118 (stable). Glob and Grep remain absent.ToolSearchitself does disappear from the palette — eager-loading is active — but the registration gap is unchanged.2.1.116–2.1.126 all affected.
Still reproduces in 2.1.128. No change in behaviour — Glob and Grep absent from both base palette and deferred registry. New tool
ShareOnboardingGuideappeared in the base palette but does not affect the issue.Still reproduces in 2.1.138 (tested in /private/tmp, no project context, no MCP servers). Now broken across 2.1.117–2.1.138.
Still reproduces in 2.1.142 (tested in /private/tmp, no project context, no MCP servers).
Still reproduces in 2.1.146 (tested in /private/tmp, no project context, no MCP servers).
Still reproduces in 2.1.149 (CLI, macOS arm64, Darwin 24.6.0, Opus 4.7 1M).
GlobandGrepabsent from both the base palette and theToolSearchdeferred registry —ToolSearch select:Grep,Globreturns "No matching deferred tools," and keyword searches never surface them.Extra data point: hit this inside a git worktree session (
claude -w work1) on a repo whose.claude/settings.jsondenies the Bashgrep/find/catcommands to steer work toward theGrep/Globtools. With those tools missing from the registry, there's no first-class search path left — onlyReadon known paths or sub-agents. So the registration gap is materially worse for repos that (reasonably) block the Bash equivalents.Still reproducible in
2.1.154(CLI, macOS arm64)Glob isn't available directly — let me use Bash.Claude Code v2.1.161 (CLI, macOS arm64)
Still reproduces on the latest build — Claude Code 2.1.173, Opus 4.8 (
claude-opus-4-8), macOS (darwin 25.4.0). The newest env data point here was 2.1.156 (#63525, closed as dup of this), so confirming it's not yet fixed.Two data points that may help narrow it:
ANTHROPIC_BASE_URLset (only an unrelated custom*_LOCALvar). The original report wondered whether the registration bug was tied to the Vertex/proxy path; it isn't.GrepreturnsError: No such tool available: Grep— distinct from theInputValidationErrora deferred-but-unloaded tool raises. SoGrep/Globaren't in the deferred registry at all; they're dropped entirely.Confirmed clean of confounders: no
permissions.deny, nodisabledTools, no managed/enterprise settings, no tool-disabling env var.ripgrep 15.1.0is installed and working (matching #63525's note that the agent mis-diagnoses this as "rg not installed"). The collision with hooks that redirect bashgrep/find→Grep/Globleaves no filesystem-search path without a manual workaround.Still reproduces on 2.1.177 (CLI), and this is a Linux data point, which I don't see elsewhere in the thread (reports so far are macOS arm64).
claude-opus-4-8)ANTHROPIC_BASE_URL)ENABLE_TOOL_SEARCH: unset (default)GrepandGlobare absent from the active palette and from the ToolSearch deferred registry:ToolSearch select:Grep,Globreturns "No matching deferred tools found," and keyword searches never surface them. So they're dropped entirely, not just deferred (matches @hendie's 2.1.173 note).Confirmed clean of confounders: checked user, project, and local settings — no
permissions.deny, nodisabledTools/disallowedTools, no managed/enterprise settings, no tool-disabling env var.So this now spans 2.1.116 → 2.1.177, on Linux as well as macOS, and is not proxy-specific.
Still reproduces on 2.1.178 (CLI, macOS arm64, Darwin 25.5.0, Opus 4.8
claude-opus-4-8, first-party Anthropic API — noANTHROPIC_BASE_URL). Extends the confirmed range past @felix-eschey's 2.1.177; now 2.1.116 → 2.1.178.GrepandGlobare absent from the active palette and the ToolSearch deferred registry. InvokingGrepreturns:That's the
No such tool availableform, notInputValidationError— genuinely unregistered, not deferred-but-unloaded (matches @hendie's 2.1.173 and @felix-eschey's 2.1.177 notes). For contrast, theTask*family andWebFetch/WebSearchare in the deferred list and load fine via ToolSearch; onlyGrep/Globare dropped entirely.Confounders ruled out for this report:
ANTHROPIC_BASE_URL(first-party API), so not the proxy path — corroborates @hendie.permissions.deny, nodisabledTools/disallowedTools, no managed/enterprise settings.ENABLE_TOOL_SEARCHunset (default) during the broken session.On the
ENABLE_TOOL_SEARCH=falseworkaround: flagging that it may not be reliable — @travisfrels-upstart reported=falsedid not restoreGrep/Globon 2.1.126 (ToolSearch disappears, eager-loading engages, but the registration gap remains). If that holds on current builds, there is no configuration that restores first-class filesystem search — the only path left isBash, which directly collides with the common hook setup that blocks bashgrep/findto steer towardGrep/Glob.https://code.claude.com/docs/en/changelog#2-1-117
https://github.com/anthropics/claude-code/issues/52476
https://github.com/anthropics/claude-code/issues/69849
Seeing this on 2.1.214, and with a couple of details that widen the repro beyond the title:
ENABLE_TOOL_SEARCHunset (i.e. Tool Search on by default) — not forced=true.ANTHROPIC_BASE_URLunset → first-party API, no gateway/proxy.disallowedTools/allowedToolsin settings.json.So it's not limited to explicitly forcing Tool Search on, and it's not proxy-specific — it happens on stock first-party config too.
It's also intermittent. On affected sessions,
GrepandGlobare absent from the active tool set and from the deferred registry —ToolSearch({query: "select:Grep,Glob"})returns "No matching deferred tools found" — while every other built-in (Read/Edit/Write/Bash/Agent/Skill/ToolSearch) is present. But simply restarting brought them back in a later session with no config change. That points at a registration race at session start rather than a deterministic config-driven drop.Note this recurs well past the 2.1.117 origin, so whatever landed since hasn't fully closed it. (#63525 was closed as a duplicate of this one.)
Adding measured data that separates the client's behavior from the endpoint's, since this thread has both a proxy/Vertex repro and a first-party one.
I logged the outgoing
/v1/messagesrequest (a logging sink in front of the endpoint) for two accounts on 2.1.217, both withENABLE_TOOL_SEARCH=trueand one MCP server. Thetoolsarray is byte-identical between an OAuth session onapi.anthropic.comand a real third-party session (z.ai, GLM):Agent, Bash, Edit, Read, ReportFindings, ScheduleWakeup, Skill, ToolSearch, Workflow, WriteDeferredToolPlaceholderanthropic-betaincludesadvanced-tool-use-2025-11-20So the client marks the same core set loaded and collapses everything else (MCP tools plus
Grep/Glob/NotebookEdit/…) into the placeholder, regardless of endpoint.Grep/Globland in the deferred bucket, which lines up with this issue.The divergence is in what the model actually receives. Functional test, asking each model to call
Bashand echo a token:| endpoint |
Bashdirectly available | turns ||---|---|---|
|
api.anthropic.com(Opus) | yes | 2 || third-party Anthropic-compatible endpoint (GLM) | no | 3 |
On
api.anthropic.comthe model callsBashdirectly. On the third-party endpoint the model reportsBashwas not in its tools and takes an extra turn to reach it, consistent with atool_searchround-trip; the endpoint'stool_searchdoes resolve it, so the beta is implemented, and it re-defers tools the request marked loaded.Net: the client is not the variable (identical payload). The endpoint decides whether the loaded set stays loaded.
api.anthropic.comhonors it; at least one third-party endpoint re-defers even the always-load tools.ENABLE_TOOL_SEARCHoverriding the non-first-party host-gate (the disable branches are guarded by!process.env.ENABLE_TOOL_SEARCH) is what exposes third-party users to whatever their endpoint does with the beta, with no warning.One caveat: I logged the request bytes, not the endpoint's raw response, so the re-defer on the third-party side is inferred from the model's observed round-trip rather than read from the response payload.
I find it weird that such a core part of the functionality of this tool has been broken for several months but reverting to an old version (2.1.116) fixed it for me at least, eg
Found a workaround by looking at the CHANGELOG:
You can enable them by passing it explicitly to the
--toolslist. Unfortunately this requires passing every other tool too manually :upside_down_face:Not having these tools falls back to Bash commands, which requires manual approval. Therefore most users will end up enabling auto mode for convenience, even for tasks that don't require it. I find the removal of these tools to be very irresponsible to say the least, and can't think of a good reason why Anthropic would do this.
Tested on latest version: 2.1.226
Thanks for the detailed reports. I tested this on the released 2.1.233 (macOS native build) and can confirm what you're seeing:
GrepandGlobare not in the tool list andToolSearch select:Grep,Globreturns "No matching deferred tools found".This is intended behavior, not a tool-search bug (which is why
ENABLE_TOOL_SEARCH=falsemade no difference). Since 2.1.117, native macOS/Linux builds ship with fast search binaries embedded, andfind/grepinside Claude's Bash tool are transparently aliased to them — so the separateGlob/Greptools were removed to save a tool round-trip. You can see it withtype grep; type findin a Bash call: both resolve to shell functions. Windows and npm-installed builds are unchanged. See the 2.1.117 entry: https://github.com/anthropics/claude-code/blob/main/CHANGELOG.mdThat said, we agree it's confusing: the tools reference still lists
Glob/Grepwithout mentioning this, and setups that block Bashgrep/findto steer toward the dedicated tools end up with no search path. We're treating this as a documentation gap and considering an easier way to keep the dedicated tools.Workaround today: start Claude Code with
--tools Grep,Glob,...(since 2.1.162) to get the dedicated tools back — I verified on 2.1.233 that--tools Grep,Glob,Bash,Readexposes all four. Alternatively, let Bashgrep/findthrough in your hooks on native builds; they are the fast embedded tools.🤖 Generated with Claude Code
Still reproduces on 2.1.233, and the trigger looks broader than the original report: native install, macOS 26.6, model
claude-opus-5[1m], first-party claude.ai host with deferred tools on by default —ENABLE_TOOL_SEARCHis not set anywhere in my settings. So this isn't limited to explicitly opting in on a non-first-party host.Same shape as reported:
Read,Edit,Write,Bash,Agent,Skill,ToolSearchresident;WebFetch,WebSearch,NotebookEdit,Monitor,SendMessageand ~250 MCP tools deferred and resolvable;GlobandGrepin neither list.ToolSearchwithselect:Glob,Grep,WebFetchreturns onlyWebFetch, which rules out a ToolSearch query problem.One detail that may explain why they never re-register
Enumerating every tool definition in the shipped binary (
grep -aoh -E 'userFacingName\(\)\{return"[A-Za-z]{2,20}"'over~/.local/share/claude/versions/2.1.233) returns 19 distinct names — and there is noGloband noGrepdefinition in the binary at all. There is, however, aSearchtool, alongside aCLAUDE_CODE_USE_NATIVE_FILE_SEARCHenv var.That suggests
Glob/Grepweren't dropped from the registry so much as replaced by a consolidatedSearchtool. The gap is that the replacement doesn't arrive: settingCLAUDE_CODE_USE_NATIVE_FILE_SEARCH=1in the shell did not surface aSearchtool in my headless probes, so the session ends up with the old tools gone and the new one gated off — no file-search tool of any kind. Everything falls back toBashwithrg/find, which works but costs a shell round-trip per search, loses the structured output, and quietly ignores therespectGitignorehandling the native tools do.Two things that would help, in rough priority order:
Glob/Grepare intentionally superseded, havingSearchregister whenever they're absent (rather than behind an independent gate) would close the gap — right now the two switches can both be off at once, and nothing tells the user.grepfor everything.Happy to supply the full 19-name list or the surrounding disassembly if useful.
Correction to my comment above — one claim in it was wrong, and the truth makes this report stronger, not weaker.
I said no
Glob/Grepdefinitions exist in the 2.1.233 binary. That was an artifact of how I searched: I grepped foruserFacingName(){return"Glob"}. Both tools are present — they've simply had their display name changed. Two distinct tool definitions returnuserFacingName(){return"Search"}:and the two name constants resolve to exactly what you'd expect:
So the registered tool names are still
GlobandGrep— only the UI label was consolidated to "Search". Grep's schema is intact in there too (mode: content|files_with_matches|count,multiline,head_limit,offset, the[".git",".svn",".hg",".bzr",".jj",".sl"]ignore list).The important part for this issue: neither definition has an
isEnabled(), ashouldDefer, or analwaysLoadflag. They are unconditionally-enabled tools. There is no feature gate to be off. Yet on my install they appear in neither the resident nor the deferred list, andToolSearchcan't find them by exact name or by description keywords.What I ruled out on 2.1.233 (native, macOS, first-party host)
| Hypothesis | Result |
|---|---|
| The deferral mechanism drops them | ❌
ENABLE_TOOL_SEARCH=falsedemonstrably turned deferral off (ListMcpResourcesTool,ReadMcpResource*,WaitForMcpServers,Monitorall became resident) —Glob/Grepstill absent || Model-specific tool set | ❌ absent on
sonnet,opus, andhaikualike || Version regression | ❌ 2.1.228 / 2.1.231 / 2.1.232 all ship the same two "Search" tools |
| Managed/policy settings restricting tools | ❌ no
managed-settings.jsonat any of the three macOS paths || Missing ripgrep | ❌ the bundled
rgshim (ARGV0=rg→ the CLI binary) is installed and works || Broken settings file silently ignored | ❌ every file in the cascade passes
jq empty||
tengu_non_deferrable_builtinsnot pinning them | ❌ patching the cached value to{"Glob":true,"Grep":true}in~/.claude.jsonchanged nothing || A
Searchreplacement arriving instead | ❌CLAUDE_CODE_USE_NATIVE_FILE_SEARCH=1surfaces noSearchtool either |Everything locally observable says these two tools should register, and they don't — which points at the tool list resolved for the account/session rather than at client code or local config. Since
tengu_deferred_stub_toolistrueandtengu_non_deferrable_builtinsis{}on my install, my guess is that builtins with noshouldDeferflag fall between the two buckets when deferral is active, but I can't confirm that from the outside.Two asks, unchanged in substance from my earlier comment:
grep/findfor every search, which reads to the user as the model degrading.Apologies for the noise from the incorrect first claim — happy to run further probes on this install if it helps narrow it.
Adding a data point that doesn't match the "removed on native builds" explanation above — this looks like it's the same underlying gap @mszyma found (tools present, unconditionally enabled, just not resolving), but triggered a different way.
Confirmed on Claude Code CLI 2.1.239: custom subagents never receive
Grep/Globin their resolved runtime tool schema, regardless of how the agent'stools:frontmatter is written — explicittools: Bash, Read, Grep, Glob, ...in the agent file makes no difference, they're simply absent at runtime. Built-in agents (e.g.Explore,Plan) are unaffected and resolve them normally. This isn't native-build-specific in our case and doesn't look like thebfs/ugrepBash-aliasing behavior described upthread (see also #52476, which found that changelog note wasn't actually the explanation) — it's specifically the custom-subagent resolution path that drops them, which lines up with @mszyma's finding that both tools are present in the binary, unconditionally enabled, with noisEnabled/shouldDefergate, but aren't showing up resident or deferred.Cross-referencing the two earlier reports of what looks like the same root issue: #52004 (closed completed, but multiple commenters report it persisting well after the fix landed) and #52055 (closed as a duplicate of #52004/#51921).
Happy to share our subagent config / repro steps if useful for narrowing this down.