{"slug": "fold-your-subagents-into-one-agent-loop", "title": "Fold Your Subagents Into One Agent Loop", "summary": "Anthropic's Applied AI team reports that across several enterprise deployments, a single agent with skills \"frequently outperformed\" both one-giant-prompt and subagent designs on quality, \"often\" at lower cost and latency per task. Anthropic attributes the shift to shared context, progressive disclosure (which it says cut Claude Code's system prompt for more advanced models by over 80%), and models from Opus 4.5 onward handling far more in one loop, and it warns that splitting agents by product team reproduces the org chart via Conway's law. Anthropic still uses subagents for verification, parallel work and splitting permissions, and advises splitting by context rather than problem type when a split is needed.", "body_md": "This week I stopped a code-review skill from spawning five finder subagents on one diff. Five context windows, each handing a summary back to the parent. I had the same checks run inline, in the main session, and then made “no subagents, work inline” a rule in my Claude Code setup.\n\nThat is one person’s setup and one skill. It proves nothing on its own. But a few weeks earlier, Anthropic’s Applied AI team had published the enterprise version of the same call.\n\nA subagent is an agent with its own context window, tools and instructions, run by a coordinator. Anthropic is clear that subagents are useful. They use them for verification, parallel work and splitting permissions, and their own multi-agent research system runs on them.\n\nThe problem they describe is how large companies end up with them. A company wants one agent that fronts several products. Each product has its own team. So each team builds its own agent, and a platform team puts an orchestrator on top. The architecture becomes a copy of the org chart. That is Conway’s law, and they name it.\n\nThey list what goes wrong next:\n\nAcross several enterprise deployments, a single agent with skills “frequently outperformed” both the one-giant-prompt design and the subagent design on quality, “often” at lower cost and latency per task.\n\nTeams split work across subagents for a real reason: one prompt could not hold everything. Anthropic gives three reasons that has changed.\n\n**Shared context gives better answers.** When results from several steps sit in one context window, the model can connect them. A set of summaries handed back by subagents loses exactly the detail that would let it do that.\n\n**Progressive disclosure removes the bloat.** The agent sees only short descriptions of its skills and tools. The full text loads when it is needed. Skills disclose instructions this way, and tool search does the same for tool definitions. Anthropic says it cut Claude Code’s system prompt for more advanced models by over 80%, partly through this.\n\n**Models carry more.** Starting with Opus 4.5, models could manage far more in one loop than most teams expected. Recent models narrate progress and check their own work, which makes some harness code redundant. They add a point I had not thought about: in migrations they helped with, rigid multi-agent structures were often what stopped a newer model from doing more of the work. A simpler loop is easier to move to the next model.\n\nHere is the design they suggest working toward, as I read it:\n\nThe biggest change sits in one line: **the model writes its plan in context on the first turn and revises it as results arrive.** In an orchestrator setup, one component plans and others execute. Here the model that wrote the plan is the one carrying it out, so it can change course mid-task.\n\nIn code, the core is small. This is my sketch of the shape, not Anthropic’s code:\n\n``` python\ndef run(task, budget):    context = [system_prompt, skill_descriptions, task]    while not budget.spent():        reply = model(context)               # plan, tool calls, or an answer        if reply.is_answer:            return verify(reply)             # optional check        results = run_parallel(reply.tool_calls)  # write gates live in the tools        context += [reply, results]          # raw results, not summaries        budget.charge(reply)    return budget_exhausted(context)\n```\n\nEverything a subagent used to own has to land somewhere in that loop.\n\nThe permissions point is the one I would steal first. A tool that answers “this user can’t see refunds over $500” in plain text is a guardrail the model can reason about. A separate agent per access level is a guardrail it never sees.\n\nAnthropic does not say subagents are dead. They say keep one when:\n\nIf you do split, split by context, not by problem type. Give each subagent a piece of work that needs little from the rest of the system and hands back a compact result: an independent research path, a component with a clean interface, a black-box verifier. Split by problem type and the agents play telephone, losing fidelity with each handoff.\n\nEven when you keep one, have the main agent **call it as a tool** so the main agent keeps the conversation. A full handoff, where the subagent takes over, only makes sense when it has to talk to the user directly.\n\n**1. Build an eval first.** One shared end-to-end set, owned by a central team, plus small eval sets each team ships with its skill. They say 10 golden examples is enough to start. Grade the final answer against a rubric. While an orchestrator still exists, also track routing accuracy: did it pick the right subagent? After a fold, track whether the agent loaded the right skill or called the right tool. If your systems are hard to replay, record timestamps on key events so you can replay them later as targeted evals.\n\n**2. Call your subagents as tools.** No rewrite needed. You get a shared response schema, the main agent can check conclusions against real data, and you get a baseline score. The costs remain: each specialist still has its own prompt, owner and evals, each call still returns a lossy summary, and each call is a nested model loop that adds latency.\n\n**3. Merge tightly coupled specialists.** If much of your traffic is specialist A followed by specialist B, or two specialists touch the same data, they are one domain agent in practice. Merge them, starting with the most-used.\n\n**4. Fold one subagent.** Its prompts become a skill. Its API calls become MCP tools.\n\n**5. Compare, and look at which tasks flipped.** This is the most useful part of the article. On a sample support agent, folding one subagent into another lowered latency. It also broke a process that had been passing. The main agent held the order lookup tool and answered on its own, without asking the shipping specialist for the delivery date. That break showed up in one run out of two.\n\nSo before each change, make sure the eval has a task for every chain of agents that runs together in production and for every rule the agent must not break. Run each task more than once. Keep the subagent only if the folded version scores worse. Then fold the next one.\n\nFolding the architecture also changes who owns what. Teams stop owning agents and start owning skills and tools, each with a named owner who keeps them distinct and ships them with evals. One small central team owns the system prompt and end-to-end quality, and vets every new skill, tool and eval before it ships. Small, because coordination cost grows with headcount.\n\nAnthropic also ships a migration kit for this (build-eval, prompt-audit, hillclimb, cost-optimize). I haven't run it.\n\nWhich of your subagents would survive that test? If you found this useful, give it a clap and drop a comment. I’d love to hear your thoughts 🙌\n\n*Source: Anthropic, “Building agents: When to fold subagents into your main agent loop”, Diane Sarkis, October 22, 2026.*\n\nFollow me here on [Medium](https://medium.com/@kushalbanda) for more Claude Code deep dives, connect on [LinkedIn](https://www.linkedin.com/in/kushalbanda/), or follow me on [X](https://x.com/Kushal__23), where I post every day about what I’m building.\n\n[Fold Your Subagents Into One Agent Loop](https://pub.towardsai.net/fold-your-subagents-into-one-agent-loop-02cb6ad421f4) was originally published in [Towards AI](https://pub.towardsai.net) on Medium, where people are continuing the conversation by highlighting and responding to this story.", "url": "https://wpnews.pro/news/fold-your-subagents-into-one-agent-loop", "canonical_source": "https://pub.towardsai.net/fold-your-subagents-into-one-agent-loop-02cb6ad421f4?source=rss----98111c9905da---4", "published_at": "2026-11-18 21:01:02+00:00", "updated_at": "2026-11-18 21:43:28.134140+00:00", "lang": "en", "topics": ["ai-agents", "large-language-models", "ai-tools", "developer-tools"], "entities": ["Anthropic", "Claude Code", "Opus 4.5"], "also_reported_by": [], "takeaway": "Run checks inline in one agent loop with raw tool results kept in a shared context window instead of spawning finder subagents, since Anthropic found a single agent with skills frequently beat subagent designs on quality, often at lower cost and latency per task.", "recommendation": {"advice": "Keep one agent loop with raw results in shared context and enforce permissions as plain-text tool gates; split into subagents only by context, not by problem type.", "playbook": "agent-architecture", "playbook_url": "https://wpnews.pro/playbooks/agent-architecture"}, "alternates": {"html": "https://wpnews.pro/news/fold-your-subagents-into-one-agent-loop", "markdown": "https://wpnews.pro/news/fold-your-subagents-into-one-agent-loop.md", "text": "https://wpnews.pro/news/fold-your-subagents-into-one-agent-loop.txt", "jsonld": "https://wpnews.pro/news/fold-your-subagents-into-one-agent-loop.jsonld"}}