claude-code - 💡(How to fix) Fix [BUG] Subagents cannot invoke the Agent tool in 2.1.107 despite declaring it in frontmatter (nested subagent spawning broken) [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#47927Fetched 2026-04-15 06:38:23
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
1
Timeline (top)
labeled ×6commented ×1

Error Message

Error Messages/Logs

Code Example

1. Parent/child toolset discrepancy (smoking gun).                                                          
                                                                                                              
  The main thread's subagent registry lists the orchestrator with Agent granted. The running subagent at the same moment reports Agent missing. Concrete strings to paste:
                                                                                                              
The main-thread subagent registry advertises the orchestrator with (Tools: Read, Grep, Glob, Bash, Edit,  
Write, Agent).
                                                                                                             
The running subagent reports its actual tools as Read, Grep, Glob, Bash, Edit, WriteAgent is stripped  
  ▎ between registry and runtime despite the frontmatter declaration.
                                                                                                              
  That parent-says-granted / child-says-missing gap is the clearest signal something is filtering the toolset 
  on delivery, not at declaration.
                                                                                                              
  2. Release-timing correlation.                            

   Claude Code 2.1.107 was published 2026-04-14 05:18 UTC. The first reproduction of this issue occurred     
2026-04-14 14:04 CEST (12:04 UTC) — roughly 7 hours after the release. Four consecutive reproductions 
  ▎ followed over the next 60 minutes across two terminal sessions. No Claude Code updates or config changes  
  ▎ happened between reproductions.                         

  3. Ruled-out causes (saves the triager time).                                                               
   
   The following were checked and ruled out:                                                                 
- ~/.claude/settings.json is minimal and contains no tool restrictions.
   - Project settings.local.json permissions.allow explicitly includes "Agent".                              
   - The child subagent's frontmatter tools: list explicitly includes Agent.                                 
   - A clean git working tree and a fresh terminal session both reproduce the issue.                         
   - claude --version confirms 2.1.107 is running in all failing sessions.
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

A custom subagent defined with Agent in its frontmatter tools: list cannot actually call the Agent tool at
runtime. When it tries, it reports that Agent is not in its available toolset and exits without spawning a nested subagent. This blocks orchestrator-style patterns where one subagent coordinates others.

Actual: The subagent reports Agent as unavailable and exits. Reproduced in multiple fresh terminal sessions.

Version: Claude Code 2.1.107

What Should Happen?

Expected: The subagent invokes Agent and spawns a nested subagent, as its frontmatter declares.

Error Messages/Logs

1. Parent/child toolset discrepancy (smoking gun).                                                          
                                                                                                              
  The main thread's subagent registry lists the orchestrator with Agent granted. The running subagent at the same moment reports Agent missing. Concrete strings to paste:
                                                                                                              
  ▎ The main-thread subagent registry advertises the orchestrator with (Tools: Read, Grep, Glob, Bash, Edit,  
  ▎ Write, Agent).
  ▎ The running subagent reports its actual tools as Read, Grep, Glob, Bash, Edit, Write — Agent is stripped  
  ▎ between registry and runtime despite the frontmatter declaration.
                                                                                                              
  That parent-says-granted / child-says-missing gap is the clearest signal something is filtering the toolset 
  on delivery, not at declaration.
                                                                                                              
  2. Release-timing correlation.                            

  ▎ Claude Code 2.1.107 was published 2026-04-14 05:18 UTC. The first reproduction of this issue occurred     
  ▎ 2026-04-14 14:04 CEST (12:04 UTC) — roughly 7 hours after the release. Four consecutive reproductions 
  ▎ followed over the next 60 minutes across two terminal sessions. No Claude Code updates or config changes  
  ▎ happened between reproductions.                         

  3. Ruled-out causes (saves the triager time).                                                               
   
  ▎ The following were checked and ruled out:                                                                 
  ▎ - ~/.claude/settings.json is minimal and contains no tool restrictions.
  ▎ - Project settings.local.json permissions.allow explicitly includes "Agent".                              
  ▎ - The child subagent's frontmatter tools: list explicitly includes Agent.                                 
  ▎ - A clean git working tree and a fresh terminal session both reproduce the issue.                         
  ▎ - claude --version confirms 2.1.107 is running in all failing sessions.

Steps to Reproduce

Reproduction:

  1. Create .claude/agents/orchestrator.md:

name: orchestrator tools: Read, Grep, Glob, Bash, Edit, Write, Agent

Use the Agent tool to spawn a subagent.
2. From the main thread, invoke it with subagent_type: "orchestrator". 3. The subagent replies that Agent is not in its toolset and refuses to spawn anything.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

Claude Code 2.1.107

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Likely regression: The same pattern worked in an earlier Claude Code version without even listing Agent in
the frontmatter. Explicitly adding it in 2.1.107 does not restore the behavior, suggesting Agent is being
stripped from subagent toolsets regardless of the frontmatter declaration.

Ask: Either honor Agent in subagent frontmatter (restoring prior behavior), or document the restriction so users can redesign affected patterns.

extent analysis

TL;DR

The issue can be fixed by either modifying the Claude Code to honor the Agent tool in subagent frontmatter or documenting the restriction and redesigning affected patterns.

Guidance

  • Verify that the tools list in the subagent's frontmatter includes Agent and that the permissions.allow in settings.local.json also includes Agent.
  • Check if there are any other configuration files or settings that might be overriding the frontmatter declaration.
  • Test if the issue persists when using a different subagent or tool to isolate the problem.
  • Consider redesigning the affected patterns to work around the potential restriction on the Agent tool.

Example

No code snippet is provided as the issue seems to be related to configuration and tool permissions rather than code.

Notes

The issue appears to be a regression introduced in Claude Code version 2.1.107, and the exact cause is not clear. The provided information suggests that the Agent tool is being stripped from the subagent's toolset despite being declared in the frontmatter.

Recommendation

Apply a workaround by redesigning the affected patterns to not rely on the Agent tool or wait for a potential fix in a future version of Claude Code that honors the Agent tool in subagent frontmatter. The reason is that the current version (2.1.107) has a regression that causes the issue, and a workaround or redesign might be necessary until a fixed version is released.

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