Sub topic 15
When a Single Agent Is the Better Choice
This chapter assumes you know the orchestrator-worker pattern, what a delegation brief is, and how a context window fills up. It also assumes you can read basic Python. Here you will learn when to skip all of that and keep the work in one agent.
Start from one agent
Delegation is an optimization. A single agent has one context, one view of the files, and one line of reasoning. Every subagent you add gives up some of that in exchange for isolation or parallelism.
Treat one agent as the default. Add subagents only when you can name the specific problem they solve:
- The context window is filling with material the parent does not need, such as search results or long logs.
- Several independent pieces of work can run at the same time.
- A piece of work needs a different tool set or permission level than the parent.
If you cannot name one of these, a single agent is probably the better choice.
Why delegation can cost more than it saves
Context is lost at the boundary
A subagent sees only its brief. It does not see the conversation, the files the parent already read, or the decisions made earlier. Anything the subagent needs must be written into the brief, and anything it learns comes back only as a summary.
For a task that depends on many small decisions, this is a poor trade. Suppose you are renaming a concept across a codebase and choosing names as you go. The parent holds those choices in its context. A subagent would need all of them in the brief, and writing that brief can take longer than doing the rename.
Coordination overhead is fixed
Each delegation has a fixed cost that does not shrink with the task:
- Writing the brief.
- Starting the subagent and letting it re-read the files it needs.
- Reading the summary it returns.
- Verifying the result, because a summary describes the work but does not prove it.
Small tasks never recover this cost. Renaming one function or fixing one failing test is faster done directly.
Tokens and money add up
Each subagent pays for its own context, including re-reading files the parent has already read. A parallel run of four subagents often uses more total tokens than one agent doing the same work in sequence. Parallelism reduces elapsed time, not total work. If you are not waiting on the wall clock, you pay more and gain nothing.
Coupled work produces conflicts
Subagents are safe to run in parallel only when their work is independent. Two tasks are coupled when they:
- edit the same file,
- depend on a function signature that the other task is changing,
- need a shared design decision, or
- must be reviewed together to make sense.
Separate git worktrees stop file overwrites, but they do not stop semantic conflicts. If one subagent renames parse_args and another adds tests that call parse_args, both branches merge cleanly and the test suite still breaks. Merging then becomes the real work, and you do it with less context than either subagent had.
More agents mean more failure modes
Each subagent can fail, time out, return a wrong summary, or drift outside its scope. An orchestrator must handle each case. One agent has one trajectory to inspect. Four agents have four trajectories plus the orchestrator's, which makes debugging and tracing harder.
Situations compared
| Situation | Better choice | Reason |
|---|---|---|
| Fix a bug in one function and its test | Single agent | The task is small and the pieces are tightly linked. |
| Rename a function and update all callers | Single agent | Every edit depends on the same decision. |
| Refactor a module with an unclear design | Single agent | The design emerges as you work, so a brief cannot capture it. |
| Search a large repository for every use of a deprecated API | Subagent | The parent needs only the list, not the search noise. |
| Update docs, add tests, and fix lint in separate files | Parallel subagents | The tasks are independent and clearly scoped. |
| Review a finished change with fresh eyes | Subagent | A clean context avoids the author's blind spots. |
| Run a long test suite and report failures | Subagent | Verbose output stays out of the parent's context. |
The pattern in the table: delegate work that is wide, independent, noisy, or needs a clean perspective. Keep work that is narrow, coupled, or still being designed.
A decision checklist
Ask these questions in order. Stop at the first "no" in the first group, or the first "yes" in the second group.
- Can you write a brief that states the goal, scope, constraints, and a checkable finish condition? If not, you do not yet understand the task well enough to delegate it.
- Is the task big enough that writing the brief and verifying the result takes less effort than doing the work?
- Does the task avoid depending on decisions the parent is still making?
- Do any parallel tasks avoid sharing files and interfaces?
The second group are reasons to use a single agent regardless of the first group:
- Does the whole task fit comfortably in one context window?
- Is the work an exploratory design where each step changes the next?
The next script encodes this checklist. It is a thinking aid, not a replacement for judgment.
from dataclasses import dataclass
@dataclass
class TaskProfile:
can_write_checkable_brief: bool
effort_exceeds_overhead: bool
independent_of_parent_decisions: bool
shares_files_with_other_tasks: bool
fits_in_one_context: bool
exploratory_design: bool
def recommend(profile: TaskProfile) -> str:
if profile.exploratory_design:
return "single agent: the design changes as you work"
if not profile.can_write_checkable_brief:
return "single agent: no checkable brief yet"
if not profile.independent_of_parent_decisions:
return "single agent: task depends on parent decisions"
if not profile.effort_exceeds_overhead:
return "single agent: overhead exceeds the work"
if profile.shares_files_with_other_tasks:
return "sequential subagents or single agent: tasks overlap"
if profile.fits_in_one_context:
return "single agent is fine; delegate only for speed"
return "subagents: delegate independent units"
if __name__ == "__main__":
rename = TaskProfile(True, False, False, True, True, False)
docs_and_tests = TaskProfile(True, True, True, False, False, False)
print(recommend(rename))
print(recommend(docs_and_tests))Running it prints single agent: task depends on parent decisions for the rename, and subagents: delegate independent units for the docs-and-tests case.
Failure modes of over-delegation
Watch for these signs that you delegated when you should not have:
- The brief is longer than the diff it produced.
- You re-read the subagent's files to understand its summary.
- You rewrite a subagent's output because it missed a convention the parent knew.
- Merges need manual fixes after parallel branches finish.
- The same file was read in full by three agents.
- You cannot explain why a subagent made a particular choice, because the reasoning stayed in its context.
Middle paths
You do not have to choose between everything delegated and nothing delegated. These options keep most of the benefit of a single agent:
- Delegate only the noisy step. The parent does the design and edits, and a subagent runs the test suite or searches the repository and returns a short report.
- Delegate review, not authorship. One agent writes the change, and a fresh subagent reviews it against the stated requirements.
- Work sequentially in one agent, then compact. If the context is filling up, summarize progress and continue instead of splitting the task.
- Use a subagent only when you are waiting. If wall-clock time matters and the pieces are truly independent, parallelize those pieces and nothing else.
Summary of decision criteria
Prefer a single agent when the task is small, tightly coupled, still being designed, or fits in one context. Prefer subagents when the work is independent, noisy, or needs different permissions or a fresh viewpoint, and when you can describe it in a brief with a finish condition you can check. In both cases, the question to ask is what problem the extra agents solve, and whether that problem is bigger than the coordination they add.
Exercise
You must rename the function load_config to read_settings across a 40-file project, update its docstring, and adjust two call sites whose argument order changes as part of the rename. A teammate suggests starting one subagent per directory to finish faster. Should you? Give two reasons for your answer and describe one part of the work you could still delegate.
Show answer
Use a single agent for the edits. First, the rename and the argument-order change are coupled: every subagent needs the same decision about the new name and signature, and one that misses the signature change will break call sites in its directory. Second, the overhead is high for the benefit: forty small edits are cheap to make directly, while writing briefs, re-reading files in each subagent, and resolving merge conflicts costs more than it saves. You could still delegate the verification step. A subagent can run the full test suite and linter and return only the failing tests and their error messages, which keeps the noisy output out of the parent's context.