What is a Subagent?
Learn what a subagent is, how it differs from an AI agent, when to use one, and how Claude Code subagents work in multi-agent systems.

Learn what a subagent is, how it differs from an AI agent, when to use one, and how Claude Code subagents work in multi-agent systems.


Learn what a subagent is, how it differs from an AI agent, when to use one, and how Claude Code subagents work in multi-agent systems.

A subagent is a specialized AI agent delegated by a parent or orchestrator agent to complete a bounded part of a larger goal. It may have its own instructions, tools, permissions, model, and working context. When the task is complete, it returns a result to the parent, which decides what happens next.
That parent-child relationship is the durable definition. The exact context model is not universal. Claude Code and Cursor commonly give subagents separate context windows, while some frameworks can share session state across agents. A useful definition should describe the role and delegation pattern without assuming that every platform handles memory in the same way.
An AI agent is typically a system that can interpret a goal, decide what to do next, and use tools to act. For a broader foundation, see JADA's guide to custom AI agents. A subagent uses the same general capabilities, but its mandate is narrower and its place in the hierarchy is explicit. It is a role in an architecture, not a weaker model.
Most subagent workflows follow an orchestrator-worker pattern. The orchestrator does not simply distribute prompts. It decides whether delegation is worthwhile, gives each worker an explicit contract, tracks completion, and consolidates the findings.
The parent agent interprets the user's objective, constraints, and completion criteria.
It separates the goal into independent or specialist tasks that can be delegated safely.
It chooses a predefined subagent or creates one with the right instructions, tools, model, and permissions.
The parent provides the facts, files, state, and expected output the subagent needs without transferring unnecessary noise.
The subagent reasons, uses tools, and checks its work within the authority it has been given.
The subagent reports its result, evidence, and uncertainty. The parent compares, combines, escalates, or takes the next action.
This orchestration layer is what turns several isolated workers into an agentic AI workflow. Without task contracts, state handling, and a clear consolidation step, a group of agents is just a set of concurrent model calls.
The difference is mainly about responsibility and position in the workflow. Agent describes a system's ability to pursue a goal and take actions. Subagent describes an agent that has been delegated a limited part of another agent's goal.
A subagent can be technically as capable as the parent. It may even use a stronger model or a broader tool set for a specialist task. What makes it a subagent is not model size. It is the delegated scope and reporting relationship.
A main coding agent is asked to prepare a release. It delegates repository exploration to one subagent, security review to a second, and test-failure analysis to a third. Each worker returns a concise report. The main agent decides which fixes to make, resolves conflicts, runs the final checks, and presents the release summary.
A procurement agent is asked to prepare a supplier-risk assessment. It delegates sanctions screening, financial-risk analysis, contract compliance, and news research to specialist subagents. The parent compares the evidence, flags disagreements, and sends high-risk decisions to a human approver. The subagents accelerate evidence gathering; they do not replace the accountable decision-maker.
If the same specialist role appears repeatedly, it is a candidate for a reusable subagent definition. If it is a one-step deterministic action, a normal tool or workflow function may be the better design.
Subagents are valuable when a larger task contains work that is independent, context-heavy, or best handled by a specialist. The gains come from architecture, not from multiplying agents for its own sake.
Anthropic reported that its lead-agent and parallel-subagent research system outperformed a single-agent setup by 90.2% on an internal research evaluation. The same report found that token usage alone explained 80% of performance variance on BrowseComp. The result is important, but it is not a universal promise: breadth-first research benefits from parallel search in a way that tightly coupled tasks may not.
A single agent is usually the better starting point. Add a subagent only when separation creates measurable value that exceeds the cost of another context, another handoff, and another failure surface.
Start by testing the use case with one well-instrumented agent. Move to subagents when evaluation shows a persistent limitation in context, expertise, latency, permissions, or independent verification. That baseline makes it possible to prove whether the multi-agent design actually improved the outcome.
People searching for Claude Code sub agents are referring to the feature Anthropic styles as subagents, one word. In Claude Code, a subagent is a specialized assistant that works inside a single session, uses its own context window, and returns its result to the main conversation.
Claude agents is a broader phrase. It can refer to agents built with Claude models, Agent SDK applications, Claude Code sessions, or coordinated agent teams. A Claude Code subagent is one specific delegation mechanism within that wider ecosystem.
According to the official Claude Code subagent documentation, custom subagents can define their own system prompt, tool access, model, permissions, hooks, skills, memory, effort, maximum turns, and isolation settings. Claude can delegate automatically when a task matches the subagent description, or the user can request the subagent directly.
A basic project-level definition is stored in the .claude/agents directory as a Markdown file with YAML frontmatter. The exact fields may change as Claude Code evolves, so teams should validate configuration against the current official documentation before rollout.
---
name: security-reviewer
description: Review changed code for security risks after implementation
tools: Read, Grep, Glob
model: sonnet
---
Inspect the changed files for injection, access-control, data-exposure,
and secret-management risks. Return findings with evidence, severity,
and a recommended fix. Do not edit files.
This example is deliberately narrow. It tells Claude when to use the subagent, limits the tool set to read-only operations, defines the model, names the risks to inspect, and specifies the expected output. A vague description such as helps with security would give the parent too little routing signal.
Claude Code distinguishes subagents from agent teams. Subagents report back to the main agent, which coordinates the work. Agent teams are separate Claude Code sessions with shared tasks and direct communication between teammates. Teams suit work that requires debate or ongoing coordination; subagents suit focused work where the parent mainly needs the result.
There is also a third pattern: an agent used as a tool. In Google ADK's terminology, that is a self-contained specialist called through a strict input-output contract, while a sub-agent participates in a more stateful workflow. This vocabulary is framework-specific. When comparing platforms, ask how context, state, permissions, and control actually move, not only what the component is called.
A production subagent needs more than a role prompt. It needs a contract that the orchestrator, operators, and evaluators can understand. The following design choices determine whether delegation remains useful as volume and risk increase.
These controls should sit inside the wider AI agent lifecycle management process. A subagent that performs well in a demo can still drift, overuse tools, expose data, or become uneconomic when upstream systems and models change.
If you are moving from architecture to implementation, JADA's guide on how to build an AI agent covers outcomes, integrations, approvals, testing, and production readiness. Map the handoffs before choosing how many agents to build.
The hard part is not creating more agents. It is deciding what should be delegated, what context and authority each worker needs, how results are verified, and where people stay in control.
JADA designs, builds, and manages production-grade AI agents around real business workflows. We define the architecture, connect agents securely to your systems, build human approval and escalation points, instrument the full workflow, and transfer the code, configurations, and operating knowledge to your team. You get a working system you can own, govern, and improve, not a collection of demos.
Considering a subagent or multi-agent workflow? Talk to JADA's AI agent team to scope the smallest architecture that can deliver the outcome reliably.
A subagent is a specialized AI agent that a parent or orchestrator agent delegates to perform a bounded task and return a result for the parent to evaluate, combine, or act on.
A subagent might research one market, inspect one part of a codebase, validate one risk, or draft one component of a response. The parent remains accountable for the end-to-end objective. This separation makes the system easier to specialize, parallelize, and control, but only when the task boundaries are clear.
A security-review subagent is a clear example. A main coding agent delegates changed files to it after implementation. The subagent inspects the code using read-only tools, returns evidence-ranked vulnerabilities and recommended fixes, and leaves the main agent to decide what to change and how to verify the release.
An agent may own the user's end-to-end objective and decide how the work should proceed. A subagent owns only a delegated portion of that objective and reports its result to a parent or orchestrator. The distinction is about scope and coordination, not necessarily model capability.
Claude Code subagents run as specialized assistants within a session. They use separate context, can be configured with their own prompt, model, tools, permissions, hooks, and limits, and return their result to the main conversation. They are best suited to focused tasks such as exploration, review, debugging, testing, or data analysis.