[BUG] Experimental agent-teams mode drops Grep and Glob from the tool roster (not ToolSearch-recoverable)
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?
With CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1, the native Grep and Glob tools are absent from the tool roster entirely — not in the active tool set, and not in the deferred-tools list either, so ToolSearch cannot recover them. This affects both the main loop and spawned subagents (even agents whose definition explicitly declares Grep/Glob in their tool list).
Bash becomes the only available search primitive. With no reliable, purpose-built search tool, the model degrades to reading whole files to locate content — a large, avoidable token cost, and exactly the failure dedicated search tools exist to prevent. It also silently breaks per-agent tool scoping: a custom subagent declaring Grep/Glob never actually receives them.
What Should Happen?
Grep and Glob should be available. Or — consistent with how this build defers other core tools (WebFetch, WebSearch, NotebookEdit appear in the deferred-tools list and are recoverable via ToolSearch) — they should at minimum be deferred and ToolSearch-recoverable. A custom subagent's declared Grep/Glob tools should also materialize rather than being stripped globally.
Error Messages/Logs
# ToolSearch with an exact-name selector for the two tools:
ToolSearch query="select:Grep,Glob"
=> No matching deferred tools found
Steps to Reproduce
- Launch Claude Code with
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1(e.g. set insettings.jsonunderenv). - Inspect the active tool roster — neither
GrepnorGlobis present; the only search/read primitives areBashandRead. - Run
ToolSearchwithselect:Grep,Glob→No matching deferred tools found(they are not even deferred). - Spawn a subagent whose definition declares
Tools: Glob, Grep, Read, Bash, ...and ask it to useGrep/Glob→ it reports neither is available, confirming the strip is global, not per-agent. - Relaunch with the flag unset →
Grep/Globreturn. This isolates the cause to the experimental agent-teams mode.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
Claude Code Version
2.1.186 (Claude Code) — next/latest dist-tag
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other (cmux — a Ghostty-based terminal)
Additional Information
- There is no
disallowedTools/disabledToolsentry in any settings file, andclauderesolves to the unwrapped native binary (no launch-flag wrapper) — so the missing tools are attributable to the experimental flag, not local config. - Reproduced both in the top-level session and via a spawned subagent.
- Suggested fix: include
Grep/Globin the deferred-tools set under agent-teams mode (same treatment asWebFetch/WebSearch) soToolSearchcan surface them; ideally keep them in the active roster since search is a hot path; and honor a custom subagent's declared tools instead of dropping them globally.