Skip to content

Checking your reading list…

Retry

Stay curious. Build better.

Appearance

Choose how BestHub looks on this device.

Changes apply immediately.

Search articles

Open Discover with these filters

Suggested searches

Anthropic's Guide: When to Fold Subagents into a Single Agent Loop

Anthropic's new article analyzes when to consolidate subagents into a single agent loop using progressive disclosure of skills and tools, reducing latency and cost while preserving subagents for parallel tasks, context isolation, and permission modularity, with a migration framework centered on end-to-end evaluation.

Why Anthropic Is Rethinking Subagents

In current agent engineering practice, multi-agent architectures are common: developers split complex tasks among specialized subagents (planner, researcher, executor, verifier) coordinated by a main agent. Anthropic's Applied AI team observed that in some enterprise deployments, folding routers, planners, and domain subagents back into the main agent loop — augmented by on-demand Skills and Tools — improves task quality and reduces cost and latency.

Comparisons across several enterprise deployments showed the single-agent approach with Skills often outperformed both a monolithic long-prompt design and a multi-subagent design on task quality, while also lowering per-task cost and latency. Two caveats: this is an observation from specific deployments, not a universal guarantee; and the single-agent approach is not simply stuffing everything into one context window — it relies on progressive disclosure to load context and tools only when needed.

A Real Enterprise Case

One customer-facing agent used over a dozen specialized subagents, causing inconsistent brand voice and added latency. Anthropic also noted a common architectural evolution: intent classifier → fixed multi-step reasoning flows → user segmentation → independent recommendation branches → multi-agent orchestrator. In many such systems, teams found large portions of the fixed structure were no longer necessary for the model to complete tasks. A clear system prompt, 4–5 lightweight data tools, and explicit output constraints could cover most needs. The lesson: don't assume an architecture required in the past is still required today.

Five Problems with Enterprise Multi-Agent Systems

1. Context Management: Handoffs Lose Detail

Each subagent has its own context window, tools, and instructions. When the main agent delegates to a subagent and receives results, it must decide what context to pass and what to get back. Across multiple handoffs, information degrades — likened to the "Telephone Game." A single agent maintaining a continuous context can directly use prior step results without relying on summaries from other agents.

2. Subagent Sprawl

Different teams build their own agents, connected by a central orchestrator. As the business grows, functionally overlapping subagents proliferate without unified standards or clear ownership. This mirrors Conway's Law: the system design replicates the organizational structure.

3. Bloated System Prompts (The Frankenprompt)

Multiple teams appending rules to a shared system prompt create instruction conflicts and inconsistent style. The resulting "Frankenprompt" reflects not just length but a lack of unified rule management and quality control.

4. Overly Localized Evaluation

Teams optimize their subagents against local test sets, but local success doesn't guarantee end-to-end correctness when agents are chained. Without a shared end-to-end eval set, teams may make architectural decisions based on misleading partial metrics.

5. Multi-Agent Architectures Add Latency

Extra routing, handoffs, and nested model calls increase latency. One customer compared their multi-agent harness against a single-agent loop and found the latter ran roughly twice as fast. Anthropic stresses this is a single data point, not a universal performance guarantee.

Core Technique: Progressive Disclosure

If not every capability gets its own agent, how to organize context, tools, and expertise? Anthropic emphasizes Progressive Disclosure : give the model a brief capability description first; load detailed instructions or tool definitions only when needed.

1. Skills: On-Demand Professional Work Methods

Skills capture workflows, rules, and judgment methods from specialized subagent prompts. The main agent loads a Skill when a relevant task appears, preserving domain knowledge without a dedicated subagent.

2. Tools: Actions, Real-Time Data, Structured Results

Tools suit operations, live data reads, and fixed-format outputs. Anthropic recommends organizing tools by user intent, not 1:1 with underlying APIs. When system-prompt tool definitions exceed ~30–50, tool selection degrades (an engineering heuristic, not a hard threshold). Use Tool Search and lazy loading to avoid exposing all tools upfront.

3. Knowledge Base: Reference Material on Demand

Policies, metric definitions, product specs — material needed only for some tasks — belong in a knowledge base accessed via search/query tools or attached to relevant Skills. Avoid retrieving and stuffing large reference corpora into every prompt.

How They Work Together

Skills — Suitable content: Workflows, rules, judgment methods. When to use: When the model must follow a professional work method.

Tools — Suitable content: Operations, real-time data reads, structured results. When to use: When the model must act or access systems.

Knowledge Base — Suitable content: Policies, metric definitions, product specs. When to use: When the model needs to look up facts.

Notable metric: Anthropic reduced the Claude Code system prompt by over 80% (including savings from progressive Skills/Tools loading). This shows reorganizing context loading can dramatically shrink resident prompt size, but it doesn't mean every agent can or should cut 80%. The key principle: don't default to loading all rules, tools, and references at task start.

Why Model Capability Growth Changes Agent Architecture

From Opus 4.5 onward, models handle more work within a single execution loop than many teams expect. Opus 5.5 and Fable 5.1 increasingly self-report progress and self-check during execution. As models improve, some harness-level control logic (e.g., pre-written code that rewrites plans based on rule catalogs) may become unnecessary. In a single-agent loop, the model can dynamically decide next steps and revise plans based on intermediate results. This doesn't mean models reliably handle all planning/verification, but it shifts the boundary: which control logic must be hard-coded in the harness vs. delegated to the model.

How the Single Agent Loop Works

Design summary: one model, one context window, an open-ended tool-calling loop.

1. Planning and Execution by the Same Model

The model writes a plan in context and continuously adjusts it as tool results arrive. Unlike a separate planner + specialist agents, the planner is the executor, so it can change the plan based on actual outcomes rather than relying on fixed steps.

2. Parallel Tool Calls

Each turn the model may emit a batch of tool calls; the harness executes them in parallel and returns raw results to the same model for the next decision. Parallelism applies within a turn; dependent tools still run sequentially.

3. Explicit Loop Limits

The harness enforces turn budgets, cost budgets, and write-control mechanisms. The loop stops when the model answers, hits a budget, or asks the user. Post-answer, optional goal checks or verifier checks can run.

4. Different Logic, Different Carriers

Work sequences and domain workflows → Skills.

Hard constraints (validation, approvals) and conversational memory queries → Tools.

Low-cost, almost-always-needed steps (e.g., entity resolution) → pre-executed code.

Mechanical work inside tools (parameter building, stream parsing, clarification recovery) → code.

Thus the single-agent loop doesn't replace all code with the model; it re-partitions responsibilities between model and engineering code.

Anthropic Does Not Recommend Eliminating All Subagents

Subagents remain valuable for:

Scenario 1: Parallel Independent Tasks

When multiple tasks can run independently and each needs a fresh context, subagents enable parallel execution and their contexts can be discarded afterward. Typical cases: independent research paths, distinct components with clean interfaces, black-box verification.

Scenario 2: Main Agent Context Growth Measurably Hurts Performance

If the single-agent context grows enough to cause measurable degradation, a separate subagent may be better. The key is measurable impact, not just a feeling that context looks long.

Scenario 3: Tool Selection Difficulty or Instruction Conflicts

If the single agent struggles to pick the right tool or the system prompt contains conflicting instructions, offloading to a subagent can help. Subagents also serve verification and modular permission management.

Bottom line: Reduce unnecessary subagents, don't pursue a pure single-agent architecture at the cost of discarding useful ones.

Step-by-Step Migration Guidance

Step 1: Build an End-to-End Evaluation Set

Before any merge, create an eval set covering real tasks. Anthropic recommends a two-tier structure: a central team maintains a shared end-to-end eval set; each team maintains a smaller eval set for its Skills. Even 10 carefully chosen golden examples can start the process. Begin by scoring final answer quality. If an orchestrator exists, track routing accuracy (correct subagent selection). After merging a subagent, verify the agent loads the right Skill or calls the right Tool. Shift evaluation focus from local task performance to end-to-end completion. For hard-to-replay environments, timestamp key events for later targeted replay.

Step 2: Merge Tightly Coupled Subagents First

Prioritize subagents that are frequently used together, depend on each other, or handle the same data. Example: if production requests consistently call Agent A then Agent B, they are merge candidates. Merge based on shared context needs, not business names or org charts.

Step 3: Call Remaining Subagents as Tools

If a subagent must stay, let the main agent invoke it via a Tool. The main agent retains the user conversation. Full conversation handoff only when the subagent must talk directly to the user. This lets you establish the new execution pattern and gather baseline evals without rewriting the subagent immediately. Drawback: the called subagent still has its own prompt and context, needs separate maintenance, and adds an extra model loop + latency per call.

Step 4: Merge One Subagent at a Time

Convert its prompt into a Skill.

Convert its API calls into MCP Tools.

Compare eval results before and after merge.

Decide based on eval data.

Don't just compare aggregate scores. Check which tasks changed — especially previously passing tasks that now fail.

A Revealing Failure Case

In a support agent test, merging subagents cut latency but broke a working business flow. The main agent had an order-lookup tool; after querying the order, it answered directly instead of continuing to the delivery-info specialist subagent, omitting the delivery date. This shows reducing agent count can improve some metrics while violating business rules. Anthropic advises: ensure the eval set covers every production agent call chain and every inviolable rule before each change. Run each task multiple times — this failure appeared only in 1 of 2 runs. Architecture migration must examine concrete failures and whether they breach business requirements, not just average performance.

Multi-Team Maintenance of a Single Agent

Enterprise agents are built by multiple teams. If independent subagents shrink, how do team responsibilities shift? Anthropic suggests moving domain reasoning into Knowledge Bases, Skills, and MCP Tools, letting each team own its specialty. A small central team owns the system prompt and end-to-end quality, reviewing new Skills, Tools, and eval sets before release.

MCP Tools: Organize by User Intent

Tools execute actions, read live data, return fixed-format results. Use lazy loading to limit initial tool definitions. If a tool depends on another's output, put prerequisite checks inside the tool and return model-understandable prompts. Permissions can work similarly: each tool checks caller permissions and returns explicit denials. One agent loop can serve users with different permissions without creating separate agents just for permission differences.

Skills: Domain Teams Own Their Work Methods

Skills hold the workflow steps, rules, and judgment methods from former subagent prompts. The teams that write and use them should maintain them. To prevent Skill sprawl, assign clear owners, keep Skills distinct, and attach appropriate evals. Two management tools help: /skill-creator: creates well-structured Skills, reviews existing ones for deduplication and restructuring. /skill-doctor: analyzes Skill library cost and actual usage frequency to identify and clean up unused content.

Knowledge Bases: On-Demand Reference Retrieval

Store policies, metric definitions, product specs in a knowledge base accessed via search/query tools or attached to relevant Skills. The emphasis remains on providing information only when needed, not pre-loading all reference material into the main agent prompt.

Anthropic's Migration Toolkit

The article introduces Claude API Skills and a Migration Kit that chains multiple Skills into a guided workflow to assess existing multi-agent systems and migrate incrementally to a single-agent loop, including a demo for simulated trials. /claude-api build-eval — Create end-to-end eval sets or per-team Skill eval sets. /claude-api prompt-audit — Detect instructions written for older models and suggest updates. /claude-api hillclimb — Iteratively improve the application using existing eval sets; compare pre/post merge performance. /claude-api cost-optimize — Analyze model call costs and evaluate optimization directions: prompt caching, token usage, reasoning effort, model selection. prompt-audit is especially noteworthy: as models improve, legacy prompts may retain rules designed for older models that now slow the agent or limit its autonomy. Auditing these rules helps identify which constraints remain necessary and which can be revisited. Tool names and purposes are from the article; actual usage should follow official documentation, current versions, and availability.

Conclusion: Continuous Evaluation Matters More Than Architecture Choice

Anthropic's article does not declare the end of multi-agent systems. It offers a method to continuously re-evaluate agent architecture as model capabilities evolve. Historically, developers used fixed routers, planners, and specialist subagents to decompose complex tasks. Now, with models better at planning, tool use, and self-checking during execution, some fixed orchestration may be unnecessary. Progressive disclosure lets the model load Skills and Tools on demand within a single context. Yet subagents still shine for independent contexts, parallel execution, black-box verification, and modular permissions. The migration path is clear: build end-to-end evals, merge one subagent at a time, compare before/after, and keep subagents that perform worse when merged. The article closes with a principle that outlasts any specific architecture: measure first, change one factor at a time, keep what proves effective. The most valuable reminder: don't stop questioning whether a habitual architecture still fits the current model and task.

Original article: https://claude.com/resources/articles/building-agents-when-to-fold-subagents-into-your-main-agent-loop?utm_source=chatgpt.com

About this article

For questions about attribution, corrections or content rights, please contactadmin@besthub.devand we will review it promptly.

AI AgentsMulti-Agent SystemsAgent ArchitectureAnthropicProgressive DisclosureLLM engineeringSubagentsagent migration

Discussion 0

Questions, practical examples and thoughtful responses.

Open full discussion