[BUG] Agent tool not available to sub-agents — prevents orchestrator pattern
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?
Sub-agents spawned via the Agent tool do not receive the Agent tool in their own toolset, even when their agent type specifies "All tools". This prevents the orchestrator pattern where a
sub-agent spawns and coordinates other agents.
What Should Happen?
Expected: A sub-agent spawned via Agent(name="orchestrator", subagent_type="custom-agent") should have access to the Agent tool so it can spawn its own sub-agents.
Actual: Sub-agents get Bash, Read, Write, Edit, Glob, Grep, SendMessage, TeamCreate, TaskCreate, MCP tools — but NOT Agent. They cannot spawn anything.
Three patterns tested, all fail:
┌──────────────────────────────────────┬────────────────────────────────────────────────────────┬──────────────────────────────────────────┐
│ Spawn Method │ Has Agent tool? │ Result │
├──────────────────────────────────────┼────────────────────────────────────────────────────────┼──────────────────────────────────────────┤
│ Foreground teammate (team_name set) │ No │ "Teammates cannot spawn other teammates" │
├──────────────────────────────────────┼────────────────────────────────────────────────────────┼──────────────────────────────────────────┤
│ Foreground inline (no team_name) │ No │ Cannot call Agent() │
├──────────────────────────────────────┼────────────────────────────────────────────────────────┼──────────────────────────────────────────┤
│ Background (run_in_background: true) │ No Agent, no TeamCreate, no SendMessage, no Task tools │ No orchestration tools at all │
└──────────────────────────────────────┴────────────────────────────────────────────────────────┴──────────────────────────────────────────┘
Environment: Claude Code v2.1.89, macOS, Opus 4.6
---
Error Messages/Logs
Steps to Reproduce
Repro:
- Enable "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1" and "teammateMode": "tmux"
- Spawn: Agent(name="test", subagent_type="general-purpose", prompt="List all your available tools")
- Sub-agent reports no Agent tool
Impact: Blocks "agent of agents" orchestrator pattern. The only entity that can call Agent() is the top-level REPL.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.89
Platform
Other
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
_No response_
This issue has 9 comments on GitHub. Read the full discussion on GitHub ↗