Problem
When users have many MCP servers, plugins, skills, and rules configured, subagents fail immediately with "prompt is too long" because they inherit the full system prompt including all MCP tool schemas. This makes Explore, Plan, and general-purpose agents completely unusable for power users.
Live Reproduction (Today)
In a single Claude Code session (v2.1.81, Opus 4.6, Claude Max) with ~15 MCP servers and ~200 skills:
# All three subagents failed simultaneously:
Agent 1 (Explore): "Prompt is too long" — 0 tool uses, 0 tokens
Agent 2 (Explore): "Prompt is too long" — 0 tool uses, 0 tokens
Agent 3 (Explore): "Prompt is too long" — 0 tool uses, 0 tokens
The failure is completely silent in the TUI — users see Done (0 tool uses · 0 tokens) with no error explanation.
Root Cause
Subagents inherit ALL MCP tool definitions from the parent session regardless of:
- The
tools: allowlist in agent frontmatter
- Whether the subagent needs those tools
- Whether the tool schemas exceed the subagent's context window
The main session already handles this via deferred tool loading (ToolSearch/MCPSearch), but subagents don't get this treatment.
Proposed Solution: Controllable Subagent Context
Add parameters to the Agent tool that control what context gets passed to subagents:
Option A: New Agent tool parameters
# In Agent tool invocation:
mcp_servers: ["github", "supabase"] # Whitelist specific MCP servers (default: none)
inherit_plugins: false # Don't inherit plugin tools/skills (default: true)
inherit_rules: false # Don't inherit rules (default: true)
context_budget: 50000 # Max tokens for inherited context
Option B: Extend existing mechanisms (lower effort)
- Apply deferred tool loading to subagents — Give subagents access to ToolSearch/MCPSearch so they can load MCP tools on demand instead of upfront
- Respect
tools: frontmatter as a hard filter — When an agent specifies tools: Read, Grep, Glob, don't include ANY other tool schemas (including MCP)
- Inherit parent's deferred-tool configuration — If the main session uses
auto:10 for MCP tool search, subagents should too
Option C: Agent-level MCP configuration
# In agent .md frontmatter:
name: my-explorer
tools: Read, Grep, Glob
mcp_servers: [] # No MCP servers for this agent
inherit_mcp: false # Explicit opt-out
Why This Isn't a Duplicate
All three issues describe symptoms of the same missing capability: subagent context is not controllable.
Current Workarounds
| Workaround |
Problem |
Use model: "opus" on all agents |
Costs more quota, defeats purpose of lightweight agents |
| Reduce MCP servers |
Defeats the purpose of having them |
Create custom agents with tools: allowlists |
Tool filtering doesn't exclude MCP schemas (the bug) |
| Move MCP servers to project-level configs |
Tedious, fragile, easy to forget |
Impact
This affects any Claude Code user with 10+ MCP servers configured. As the MCP ecosystem grows, this will affect an increasing percentage of users. The combination of:
- Silent failure (no error shown in TUI)
- No workaround that doesn't sacrifice functionality
- Growing MCP adoption
makes this a critical gap in the agent system.
Interim Plugin
As a workaround, I've created the lean-agents plugin with lightweight agent replacements. But this is a bandaid — the proper fix needs to happen in the runtime.
Problem
When users have many MCP servers, plugins, skills, and rules configured, subagents fail immediately with "prompt is too long" because they inherit the full system prompt including all MCP tool schemas. This makes Explore, Plan, and general-purpose agents completely unusable for power users.
Live Reproduction (Today)
In a single Claude Code session (v2.1.81, Opus 4.6, Claude Max) with ~15 MCP servers and ~200 skills:
The failure is completely silent in the TUI — users see
Done (0 tool uses · 0 tokens)with no error explanation.Root Cause
Subagents inherit ALL MCP tool definitions from the parent session regardless of:
tools:allowlist in agent frontmatterThe main session already handles this via deferred tool loading (ToolSearch/MCPSearch), but subagents don't get this treatment.
Proposed Solution: Controllable Subagent Context
Add parameters to the Agent tool that control what context gets passed to subagents:
Option A: New Agent tool parameters
Option B: Extend existing mechanisms (lower effort)
tools:frontmatter as a hard filter — When an agent specifiestools: Read, Grep, Glob, don't include ANY other tool schemas (including MCP)auto:10for MCP tool search, subagents should tooOption C: Agent-level MCP configuration
Why This Isn't a Duplicate
All three issues describe symptoms of the same missing capability: subagent context is not controllable.
Current Workarounds
model: "opus"on all agentstools:allowlistsImpact
This affects any Claude Code user with 10+ MCP servers configured. As the MCP ecosystem grows, this will affect an increasing percentage of users. The combination of:
makes this a critical gap in the agent system.
Interim Plugin
As a workaround, I've created the lean-agents plugin with lightweight agent replacements. But this is a bandaid — the proper fix needs to happen in the runtime.