How to Build Your First Claude Agent Team
An agent team is a set of subagents, each with one narrow job and its own context, coordinated by a main session that assigns work and merges results. Start with two roles and one handoff. Every subagent should return a small, structured result rather than a transcript of its reasoning.
What an agent team is for
The obvious pitch is speed through parallelism, and it is the weakest reason to build one. Most real work has dependencies, so agents waiting on each other is common and coordination overhead is real.
The strong reason is context isolation. A single session doing everything accumulates everything: the files it read to understand the problem, the failed attempt, the long test output, the tangent that went nowhere. All of it stays in context, competing for attention and costing tokens on every subsequent turn.
A subagent gets its own context. Send one to trace how a feature works across forty files, and it reads all forty. What comes back to your main session is a summary of the mechanism, not the forty files. The exploration cost stays contained, and the coordinating session stays sharp because it holds decisions rather than raw material.
That is the mental model worth starting from: a team is a way to spend context deliberately, with parallelism as an occasional bonus.
Define roles by output, not personality
The common mistake is casting characters. An architect, a senior engineer, a QA specialist, each with a paragraph about how they think. It produces agents that write in different registers and do roughly the same thing.
Define a role by three concrete properties instead. What it is allowed to read, so it is not searching the whole repo when it needs one directory. What it must return, exactly, in a stated shape. And what it must not do, particularly whether it can modify files.
A researcher role reads broadly, writes nothing, and returns a list of relevant locations with a one-line note on each. An implementer reads a narrow slice and the plan, edits files, and returns a diff summary plus test results. A reviewer reads a diff and the plan, writes only review notes, and returns a list of issues with severity and file locations.
Each of those is testable. You can look at what came back and say whether the role did its job. A personality cannot be evaluated that way, which is why teams built from personalities are hard to debug when they underperform.
Constrain the return value hard
The single highest-leverage rule is that a subagent returns a small structured result, not its reasoning. Ten bullet points, a JSON object, a file path plus a summary. If a subagent hands back its full transcript, the coordinating session absorbs everything you delegated in order to avoid absorbing, and you have paid the coordination cost for none of the benefit. Say in the role definition exactly what shape the answer takes, and enforce it in the prompt.
Give every role a stopping condition
A subagent with an open-ended job keeps going. Tell it what done means: found the three most relevant files, ran the test suite once and reported the result, reviewed only the changed lines. Without a stopping condition, a research subagent will read your entire repository and return an essay, which is expensive and less useful than the short answer you wanted.
The 14-minute build
Start narrower than feels satisfying. Two roles, one handoff, on a task you would otherwise do in one session.
Minutes 0 to 4: pick the task and write the coordinator's plan by hand. Which role does what, what each returns, and what you will do with the results. If you cannot write that in four minutes, the task is too vague for a team and you should do it in one session.
Minutes 4 to 9: define the two roles. Read scope, return shape, prohibitions, stopping condition. Keep each definition under a dozen lines. Longer definitions are usually a sign the role is doing two jobs.
Minutes 9 to 12: run it once on real work. Watch where the coordinator has to fill gaps, because that is the boundary you specified badly.
Minutes 12 to 14: tighten one thing. Usually it is the return shape, occasionally the read scope. Then run it again on the next task before adding anything.
The discipline that matters is not adding the third role until the first handoff is boring. Every additional role multiplies coordination surface, and a team of five that nobody can debug is worse than a single session that at least behaves predictably.
The tax: every subagent starts blind
Here is what nobody mentions in the setup tutorials. Each subagent begins with no knowledge of your project. It reads the code, infers the conventions, forms a working model, does its job, and then that model evaporates when it returns.
Run a team of four and you pay that discovery cost four times, in parallel, on every task. The researcher works out that your service boundaries follow a particular pattern. The implementer works it out again. The reviewer works it out a third time, and sometimes reaches a different conclusion, which is how you get a reviewer flagging code that follows a convention it did not discover.
So the cost of a team scales worse than the cost of a session, and consistency degrades as you add roles. Both problems have the same root: knowledge lives in individual agent contexts and dies there.
Give the team one shared source of truth
The fix is a knowledge layer outside every agent. RDK indexes your code, docs, and decision records from local vaults as encrypted private chunks on the RDK network, and every subagent queries the same index through a retrieval tool.
What changes in practice: the researcher retrieves your architecture notes instead of reconstructing them from imports. The implementer retrieves the same conventions the researcher used, so it writes code the reviewer will recognize. The reviewer retrieves the decision record explaining why an unusual pattern exists, and stops flagging it. Agents disagree less because they are reading the same source rather than each inferring their own.
The cost curve inverts too. Instead of paying the discovery cost once per subagent, each one retrieves the relevant chunk. With stacked retrieval, a private index answers 40 to 65 percent of queries, the public network of published chunks adds another 15 to 20 percent, and the LLM handles the remaining 5 to 10 percent as fallback, so token spend drops 80 to 90 percent. In a team setup that saving multiplies by the number of roles, which is exactly where a naive team gets expensive.
Build the shared index before you build the fourth role. It is the difference between a team that gets better as it grows and one that just gets costlier.
Frequently asked questions
- What is the actual benefit of an agent team?
- Context isolation more than parallelism. A subagent can read forty files to trace a feature and return only the mechanism, so the exploration never lands in your main session. The coordinating session holds decisions instead of raw material, stays sharp longer, and costs less per turn.
- How should I define a subagent role?
- By three concrete properties: what it may read, exactly what it must return, and what it must not do, especially whether it can modify files. Add a stopping condition so it knows what done means. Roles defined as personalities cannot be evaluated, which makes an underperforming team impossible to debug.
- Why should subagents return structured results instead of transcripts?
- Because a full transcript pulls everything you delegated back into the coordinating session, which recreates the context problem the team existed to solve. Specify the return shape in the role definition: a short list, a JSON object, or a file path plus summary, and enforce it in the prompt.
- How many agents should be on my first team?
- Two, with one handoff, running on a task you would otherwise do in a single session. Every additional role multiplies coordination surface. Add a third only when the first boundary is boring and you are no longer filling gaps by hand between the two existing roles.
- Why does a team cost more than a single session?
- Because every subagent starts blind and rediscovers your conventions separately, so a team of four pays the discovery cost four times per task and sometimes reaches different conclusions. A shared retrieval index fixes both: agents read the same source instead of inferring, and stacked retrieval cuts token spend 80 to 90 percent.