Subagents vs One Long Session: How to Split Real Build Work Without Losing the Plot
4 November 2026 · Updated 28 November 2026 · 12 min read · by Yang Kai
Subagents or one long Claude Code session? A field guide to splitting real build work — when delegation helps, when it hurts, plus a copyable brief.
Checklist inside: Task-splitting checklist and example subagent brief
Contents
- The verdict, up front
- What a subagent actually is
- Criterion 1: Context hygiene
- Criterion 2: Continuity of decisions
- Criterion 3: Parallelism
- Criterion 4: Cost and overhead
- Criterion 5: Verification effort
- The task-splitting checklist
- An example subagent brief
- Goal
- Scope
- Rules
- Deliverable
- Done means
- The hybrid pattern most builds settle into
- How we researched this
- The verdict by use case
Every long building session eventually becomes a swamp. The original plan, three changed decisions, a long research detour and two failed approaches all sit in one context window, competing for attention — until the agent starts re-litigating a decision that was settled an hour earlier. Nothing is broken, exactly. The plot is just getting lost.
That is the moment subagents are for. Not for making a simple task feel advanced, and not for parallelising work that is really one continuous thought. They give a bounded piece of work a clean mind, while the main session keeps hold of the whole.
Used badly, they create the opposite problem: five agents, five interpretations, and a merge you have to referee. This article compares the two shapes criterion by criterion, then gives you a checklist for splitting work and a brief you can copy. The platform mechanics are checked against Anthropic’s subagents documentation (November 2026); the judgements are labelled as judgements.
The verdict, up front
| Criterion | Winner | Why, in one line |
|---|---|---|
| Context hygiene | Subagents | Each subtask gets a clean window; the main session keeps only summaries |
| Continuity of decisions | One long session | Step twelve can use the judgement made at step three, no brief required |
| Parallelism | Subagents | Independent pieces run at the same time instead of queuing |
| Cost control | One long session | Every subagent re-loads context and pays its own overhead |
| Verification effort | Neither — size decides | Report-only audits are cheap to check; coupled code changes are not |
What a subagent actually is
Per the documentation, a subagent runs in its own context window with a custom system prompt, specific tool access, and independent permissions. Only its final message returns to the main session. Claude Code ships built-in types and lets you define your own:
| Built-in subagent | Job | Tool access |
|---|---|---|
| Explore | Fast codebase search and analysis | Read-only — Write and Edit are denied |
| Plan | Gathers context during plan mode | Read-only |
| general-purpose | Multi-step tasks needing exploration and action | Every tool available to subagents |
Custom subagents are Markdown files in .claude/agents/ (project) or ~/.claude/agents/ (personal), with name and description in the frontmatter. Claude delegates based on the description, and the tools list is enforced — a read-only reviewer stays read-only. That enforcement is what makes delegation safe to scale, and it is why the groundwork matters: a clear CLAUDE.md that actually works and a sane split in AGENTS.md vs CLAUDE.md mean every subagent inherits the same conventions without you pasting them into each brief.
A custom definition looks like this — a read-only link auditor the main session can call on any project:
---
name: link-auditor
description: Audits published articles for broken internal links and
reports them grouped by file. Use for link checks and pre-publish QA.
tools: Read, Grep, Glob
model: haiku
---
You are a link auditor. Check every internal link in the files you
are given against the routes that exist. Report file, line, link and
problem. Do not edit anything.
Three details do the work: the description states the trigger (“use for link checks”), the tools list makes “do not edit anything” a platform rule rather than a request, and the cheaper model matches a mechanical job. Briefs written for a defined subagent get shorter, because the standing parts — role, tools, report discipline — already live in the file. Subagent briefs that get used covers the brief template itself.
Criterion 1: Context hygiene
A subagent starts with fresh context. The research agent is not distracted by implementation details, and the implementation agent is not carrying three abandoned approaches. Focus improves, and the main session stays lean enough to coordinate instead of drowning.
The price of fresh context is amnesia. Everything the subagent needs must be in the brief or discoverable in the repo. And because always-loaded instructions are paid for in every session, the discipline in the context budget audit pays off double when several agents run: a bloated CLAUDE.md is no longer one tax, it is a tax per agent.
Winner: Subagents — for any task whose inputs would flood the main session.
Criterion 2: Continuity of decisions
Stay single-agent when the task is exploratory and the destination will change as you learn. Stay single when changes are tightly coupled — a refactor where each edit depends on the previous one’s result — because splitting coupled work creates coordination cost with no benefit. Stay single for small tasks entirely: a rename, a contained bug fix, a single component. The brief, the handoff and the review are real work, and on a five-minute task they cost more than the task.
A useful gut check: if you cannot write a brief for the subtask without writing “and use your judgement about the overall direction,” it is not a subtask yet. It is still part of the main thread.
Winner: One long session — a single thread of reasoning is a feature here, not a bottleneck.
Criterion 3: Parallelism
Split when a chunk is self-contained and verifiable: research a library’s current API and report back with sources; audit all articles for broken internal links; implement a well-specified component against an agreed interface; run the test-and-fix loop on a failing build while you plan the next feature.
Split when the work is wide rather than deep — many similar items, each independent. Split when a task would flood the main session with material you only need summarised: long logs, large search results, a competitor teardown. The subagent reads the swamp so your session receives the summary.
This is also where skills and subagents combine well. Hand the subagent a procedure from Claude Code skills, explained and its output becomes predictable enough to trust and check quickly.
Parallelism has one condition: the pieces must be independent in fact, not just in the plan. When subtask B needs subtask A’s output, running both at once does not parallelise anything — it produces two results, one of them built on a guess. Sequence those instead: the research subagent returns, the main session checks the report, and only then does the implementation subagent start, briefed with the findings. The main session is the scheduler in every pattern that works; subagents do not coordinate with each other, they report upward. Treat any split where two agents must agree mid-task as a design smell — that agreement is main-session work wearing a delegation costume.
Winner: Subagents — the only shape that runs independent pieces at the same time.
Criterion 4: Cost and overhead
Each subagent starts cold and must be briefed, loads the project context again, and does its own exploration before it does your task. Its output must then be merged by someone — you or the main agent. On small tasks that overhead exceeds the parallelism you bought.
There are levers: a definition’s model field can pin routine search and audit work to a cheaper model, and keeping briefs tight keeps the return trip cheap. But the honest default is that delegation costs more tokens than the same work done inline. Claude Code cost control covers how delegation interacts with a budget in detail.
Winner: One long session — delegation buys time and focus, not savings.
Criterion 5: Verification effort
Delegation only saves time if review is cheaper than doing. Verify at the level of the deliverable: check the report’s coverage statement, spot-check two or three findings, and confirm the build still passes if code changed. Mechanical guardrails help enormously — the hooks in 5 Claude Code hooks that catch the mistakes agents actually make apply to subagent edits too, so a whole class of accidents is caught before review.
The exception is the report-only audit: a subagent with read-only tools that returns a structured report has nothing to merge and little to referee, so verification is a spot-check. Coupled code changes sit at the other end — five interpretations to reconcile is slower than one session doing the work.
Winner: Neither — size decides. Audits and research delegate well; coupled implementation does not.
The task-splitting checklist
Run any candidate subtask through these questions before delegating:
- Can I state the goal in one sentence, without referencing the whole project history?
- Are the inputs named — specific files, URLs, or collections — not “the codebase”?
- Is the output defined: a file, a list, a report, a passing build?
- Can I verify the result without redoing the work?
- Does it avoid files another agent is editing at the same time?
- Are the boundaries explicit: what not to touch, what not to decide?
- Does the brief include the definition of done, including running the build or check?
- Is it big enough to justify the brief + review overhead (roughly, more than a few minutes of main-session work)?
If two or more answers are no, keep the task in the main session and clarify it there first. Most failed delegations are unclear tasks wearing a subagent costume. The full template behind the checklist is in the brief template and filled example.
An example subagent brief
# Subagent brief: Internal-link audit
## Goal
Find every broken or non-standard internal link in published articles.
## Scope
- Read: src/content/articles/** (published only, skip draft: true)
- Do NOT edit any file. This is a report-only task.
## Rules
- Valid internal links match existing routes and use trailing slashes.
- Flag links to /blog/<slug>/ where no matching article file exists.
- Ignore external links and anchor-only links.
## Deliverable
A Markdown report grouped by article:
- file, line, link found, problem (missing target / no trailing slash)
End with a count summary. If you find nothing in a category, say so.
## Done means
Every published article was checked. State how many files you scanned.
Note what the brief does: it names scope, forbids the tempting extra (editing), defines the deliverable’s shape, and requires a coverage statement so the result can be verified without re-scanning. The report-only pattern is underrated — research and audit subagents that cannot edit anything are safe to run generously.
The hybrid pattern most builds settle into
In practice the answer is rarely all one shape. The pattern that holds up across a real build looks like this:
- The main session owns the thread: the plan, the decisions, the integration, the final verification. Nothing that other work depends on gets decided anywhere else.
- Subagents own the excursions: the API research with sources, the link audit, the failing-test loop, the competitor teardown — anything with named inputs and a checkable output.
- Reports flow one way: subagents return summaries and coverage statements, never raw material. The main session reads the summary, spot-checks, and records the decision.
A concrete day: the main session implements a feature while a research subagent confirms the library’s current API and an audit subagent sweeps the content folder. Both return short reports. The main session never left the feature, never read the swamp, and still ends the day with the research applied and the audit filed. The failure mode to avoid is symmetrical — a main session that delegates the feature too, then spends its context refereeing three partial implementations of it.
How we researched this
The mechanics — context isolation, built-in subagent types, definition files, enforced tool lists — are from Anthropic’s subagents documentation, checked November 2026. The criterion verdicts are structured judgement based on how the two shapes behave, not benchmark results; no timing or cost measurements are claimed, because honest numbers here depend on your codebase and your plan.
The verdict by use case
- Exploratory build, destination unclear: one long session. The thread of decisions is the work.
- Wide, repetitive, independent items: subagents, one brief each, report-only where possible.
- A failing build plus planning to do: split — a subagent runs the test-and-fix loop while the main session plans.
- Long project, many sessions: subagents for execution, and agent memory patterns plus context budgets for long projects so decisions survive between sessions.
Start small: on your next build, delegate one research or audit task with a written brief that forbids edits and defines the report format, and review it against its coverage statement. Add implementation subagents only after your briefs reliably produce checkable work. Expect the first delegation to feel slower than doing it yourself — the brief and the review are new habits, and both get faster. The second delegation of the same shape is where the time saving shows up. When an agent does loop without converging, debugging agent loops is the field guide.
FAQ
What is the main cost of using subagents? Coordination and context re-loading. Each subagent starts cold and must be briefed, and their outputs must be merged by someone — you or the main agent. On small tasks that overhead exceeds the parallelism you bought.
When does one long session beat subagents? Exploratory work, debugging with a growing theory, and anything where step twelve depends on a judgement made at step three. A single thread of reasoning is a feature there, not a bottleneck.
How many subagents should run at once? As many as you can review honestly — for most solo builders, two or three. Parallel output you cannot check becomes a pile of unverified work, which is slower than doing it serially.
Do subagents cost extra?
They run on the same account and usage limits as the main session, but each one re-loads context and explores on its own, so the same work usually costs more tokens delegated than inline. A definition’s model field can pin routine work to a cheaper model to soften that.
What should never be delegated to a subagent? The final verification of the whole, and any decision the other pieces depend on. Delegate execution freely; keep the integrating judgement in the main session.
Category: Claude Code & Context Engineering · Tags: #claude-code #subagents #ai-coding #tutorial
Next step: this article is part of Claude Code guides, which covers the full topic from first setup to advanced use.