Context
Custom plugin subagents in Claude Code 2.1.117+ do not receive the Grep or Glob tools in their runtime function schema — regardless of whether the agent frontmatter sets tools: explicitly or omits the field. This is an upstream bug, tracked at anthropics/claude-code#52004. Duplicate filed at #52055 was closed in favor of it.
Workaround applied in this repo
Two subagents whose documented methodology depends on content search were becoming non-functional under the bug:
plugins/compound-engineering/agents/ce-learnings-researcher.agent.md
plugins/compound-engineering/agents/ce-spec-flow-analyzer.agent.md
To keep them working, Bash was added to their tools: allowlists so they can fall back to rg / find via shell. The body prompts were updated to document this fallback. Grep, Glob remain listed in tools: as documented intent — they register as no-ops today but will start working automatically once the upstream bug ships.
The other 5 agents in this branch (ce-best-practices-researcher, ce-framework-docs-researcher, ce-git-history-analyzer, ce-issue-intelligence-analyst, ce-repo-research-analyst) already had Bash for other reasons, so no workaround was needed — they still register Read, Bash, WebFetch, WebSearch, mcp__* correctly; only Grep, Glob silently drop out.
What to do when the upstream fix lands
- Verify with a new Claude Code release that
Grep / Glob are actually registering on custom subagents (probe one via a diagnostic prompt — see the PR discussion for the pattern, or just call Glob from the subagent and confirm no "No such tool available" error).
- Remove
Bash from the tools: field of ce-learnings-researcher if no other part of its body has come to depend on Bash in the meantime. Same check for ce-spec-flow-analyzer.
- Revert the fallback wording in the body prompts (remove "if
Grep isn't in your schema, fall back to Bash rg" style guidance) so the agents return to the clean, tool-specific methodology they were designed around.
- Re-run the 7-agent diagnostic to confirm all 7 have the intended tool set and no regressions.
Links
Context
Custom plugin subagents in Claude Code 2.1.117+ do not receive the
GreporGlobtools in their runtime function schema — regardless of whether the agent frontmatter setstools:explicitly or omits the field. This is an upstream bug, tracked at anthropics/claude-code#52004. Duplicate filed at #52055 was closed in favor of it.Workaround applied in this repo
Two subagents whose documented methodology depends on content search were becoming non-functional under the bug:
plugins/compound-engineering/agents/ce-learnings-researcher.agent.mdplugins/compound-engineering/agents/ce-spec-flow-analyzer.agent.mdTo keep them working,
Bashwas added to theirtools:allowlists so they can fall back torg/findvia shell. The body prompts were updated to document this fallback.Grep, Globremain listed intools:as documented intent — they register as no-ops today but will start working automatically once the upstream bug ships.The other 5 agents in this branch (
ce-best-practices-researcher,ce-framework-docs-researcher,ce-git-history-analyzer,ce-issue-intelligence-analyst,ce-repo-research-analyst) already hadBashfor other reasons, so no workaround was needed — they still registerRead, Bash, WebFetch, WebSearch, mcp__*correctly; onlyGrep, Globsilently drop out.What to do when the upstream fix lands
Grep/Globare actually registering on custom subagents (probe one via a diagnostic prompt — see the PR discussion for the pattern, or just callGlobfrom the subagent and confirm no "No such tool available" error).Bashfrom thetools:field ofce-learnings-researcherif no other part of its body has come to depend on Bash in the meantime. Same check force-spec-flow-analyzer.Grepisn't in your schema, fall back toBash rg" style guidance) so the agents return to the clean, tool-specific methodology they were designed around.Links