Subagent Briefs That Get Used: A Template for Delegation That Actually Lands
20 October 2026 · Updated 28 November 2026 · 12 min read · by Yang Kai
Subagents fail on vague briefs, not weak models. Use this brief template — context, constraints, done-definition — to get delegated work you can actually merge.
Template inside: Subagent brief template with context, constraints and done-definition
Contents
- The short version
- Why briefs fail in predictable ways
- What a subagent starts with (and what it never sees)
- The brief template
- Task (one sentence)
- Why / context
- Scope
- Constraints
- Definition of done
- Report format
- A filled example
- Four briefs that fail, and the one-line fix for each
- Brief or agent definition? Put standing constraints in the file
- Calibrating brief length to task size
- When the report comes back wrong anyway
- How we researched this
- The two-minute habit
A five-word brief can do real damage. Hand a subagent “clean up the settings pages” and it can return a cheerful, thorough refactor of three files nobody meant to touch, in a style the project does not use, with the actual settings problem untouched. The model did not fail. The brief did: it never said which pages, which problem, or what finished looks like.
This article gives you the fix — a brief template built from the three things delegated work dies without: the context the subagent cannot see, the constraints it must not break, and a definition of done it can check itself against. You get the template, a filled example, and rules for scaling it down for small tasks.
The mechanics are checked against Anthropic’s subagents documentation (November 2026): what a subagent starts with, and what it never sees unless somebody writes it down.
The short version
| A brief must carry | What happens without it |
|---|---|
| Context — why the task exists, what was already tried | The subagent guesses at intent and optimises for the wrong goal |
| Constraints — files, stack rules, behaviour to preserve | Invisible rules get broken while the visible goal gets met |
| A definition of done | The subagent decides “finished” means “the code changed” |
| A report format | You re-read the whole diff to find the one thing that matters |
Why briefs fail in predictable ways
Most bad briefs fail in one of three places. The first is missing context: the subagent does not know why the task exists, so it cannot make the small judgement calls every real task contains. Faced with ambiguity, it guesses — reasonably, and often wrongly for your situation.
The second is missing constraints. An unconstrained agent optimises for the visible goal and cheerfully violates the invisible ones: it edits files that were off-limits, adds a dependency for a two-line problem, or improves neighbouring code while it is in there. Every constraint you leave unstated is a coin flip.
The third is a missing definition of done. Without one, the subagent decides when it is finished, and its standard is usually “the code changed” rather than “the build passes and the behaviour is verified.” You then pay for verification yourself, which quietly erases the time delegation was supposed to save.
None of these are model problems. They are specification problems — which is good news, because specification is the part you control.
What a subagent starts with (and what it never sees)
Per the documentation, each subagent runs in its own context window, with a custom system prompt, specific tool access, and independent permissions. That isolation is the point — and the catch. A subagent has not seen your earlier attempts, your dead ends, or the conversation where the requirements changed. It starts colder than you do, every time.
Two consequences follow. First, anything that lives only in your session does not exist for the subagent; the brief is the only bridge across that gap. Second, standing context has to live somewhere durable. Project conventions belong in a CLAUDE.md that actually works, which every session loads, instead of being pasted into brief after brief.
The question of whether a task should be delegated at all is a separate one — subagents vs one long session works through that trade-off. This article assumes the decision is made and covers the document that decides whether the delegation lands.
The brief template
This is the full template, for any delegation bigger than a quick lookup. It takes about two minutes to fill in.
# Subagent brief: [task name]
## Task (one sentence)
[What to do, stated as an outcome: "Make the checkout form
reject expired cards with an inline error" — not "look at checkout".]
## Why / context
- [Why this matters now, in 1–2 lines]
- [What was already tried, or the dead end to avoid]
- [Relevant prior decision the subagent cannot see]
## Scope
- Touch: [files / folders / systems in bounds]
- Never touch: [files / folders / anything off-limits]
- If the fix seems to require going out of scope: stop and report.
## Constraints
- [Stack/style rule, e.g. "Match the pattern in src/forms/login.tsx"]
- [Hard limit, e.g. "No new dependencies"]
- [Behaviour to preserve, e.g. "Do not change the public API shape"]
## Definition of done
- [ ] [Observable outcome 1, e.g. "Expired card shows inline error"]
- [ ] Build passes: [exact command]
- [ ] [Test/check that must pass, with command]
- [ ] Report back: what changed, what you did NOT test, any surprises
## Report format
Return: files changed (list), how you verified, open questions.
Do not return the full file contents unless asked.
The “why” section is not optional
Two lines of context routinely change which files an agent edits first and which trade-offs it makes when the instructions run out. “Fix the login redirect” is a different job depending on whether the redirect broke yesterday in a refactor or has never worked at all. Write the why down; it is the cheapest accuracy you can buy.
Scope needs a safety valve
The “stop and report” line converts out-of-scope discoveries from silent scope creep into a message back to you. Subagents regularly find that the real problem sits one file over from the assigned one. You want that finding reported, not acted on — the decision about widening the job belongs in the main session.
The definition of done does the verifying
A checkable done-definition moves verification from you to the subagent. Name the observable outcome, the exact build command, and the test that must pass. If the brief cannot state how finished will be recognised, the task is not ready to delegate yet.
The report format protects your context
A subagent that returns three full files has spent your context budget to save its own effort. Require a summary: files changed, how the work was verified, what was not tested, open questions. That economics is the same one behind the context budget audit: delegation only wins if the return trip is summarised, not dumped.
A filled example
Here is the template filled in for a common job — adding rate limiting to an API route:
- Task: “Add per-IP rate limiting to POST /api/contact so repeated submissions return 429 after 10 requests per minute.”
- Why / context: a previous attempt with global middleware broke webhook deliveries, which is why the scope pins the change to one route.
- Constraints: no new dependencies (the project already has a token-bucket helper); existing tests pass unchanged.
- Definition of done: the 429 behaviour demonstrated with a repeatable request script, the build command green, and surprises reported rather than worked around.
Note the last clause. A done-definition that requires reporting surprises is what surfaces a deviation — say, the helper’s default window turning out to be sliding rather than fixed, which changes the effective limit — as a flagged note instead of a silent behavioural difference shipped in the merge.
Four briefs that fail, and the one-line fix for each
Most vague briefs fail in recognisable shapes. Each row below is a brief as actually written, the failure it produces, and the single line that would have prevented it:
| The brief as written | What comes back | The missing line |
|---|---|---|
| “Clean up the settings pages” | A refactor of files nobody meant, actual problem untouched | “Scope: only src/settings/profile.tsx and src/settings/billing.tsx” |
| “Fix the login bug” | A plausible fix for a different login bug than yours | “Why: since Tuesday’s refactor, SSO users land on /home instead of the page they requested” |
| “Add tests for the parser” | Tests that mirror the implementation, including its bug | “Done means: tests cover the five cases in docs/parser-spec.md, and the build passes” |
| “Research caching options” | A summary of the first three tools found, no recommendation criteria | “Report format: one table — option, cost, migration effort — and a recommendation with its reason” |
Read the pattern: no fix requires a longer brief overall, just the one section that was empty. When a delegation disappoints, diagnose it against this table before blaming the model — the missing line is almost always visible in hindsight, and writing it next time is the whole skill.
Brief or agent definition? Put standing constraints in the file
A brief is per-task. When the same delegation recurs — the same reviewer, the same audit, the same scaffolding job — Claude Code lets you promote it into a custom subagent: a Markdown file in .claude/agents/ for one project or ~/.claude/agents/ for all of them. Only name and description are required in the frontmatter; Claude reads the description to decide when to delegate, and the file’s body becomes the subagent’s system prompt.
The split that matters:
- In the definition file: anything that must hold every time. The
toolslist is enforced by the platform, not requested in prose — a reviewer defined with read-only tools cannot edit files whatever a brief says. Themodelfield can pin routine search work to a cheaper model. - In the brief: anything specific to this run — this route, this deadline, this dead end to avoid.
One budget worth knowing: descriptions are not free. Claude Code warns at startup when the combined descriptions of your custom subagents pass 15,000 tokens, because every description sits in the main session’s context whether or not its subagent ever runs. Write descriptions the way the documentation advises — state the job and the trigger, and move the detail into the definition’s body, which loads only when that subagent runs. A library of twenty agents with paragraph-long descriptions is a standing tax on every session; twenty agents with one-line descriptions cost almost nothing until called.
The same logic applies sideways. Repeatable procedures belong in skills, and rules that must never be broken belong in mechanical guardrails like hooks, not in any document an agent can talk itself out of. Keep finished briefs, too: the good ones become starting points, the same way saved procedures in the skills directory do.
Calibrating brief length to task size
Scale the template honestly. A two-minute lookup needs three lines: the question, where to look, and “return only the answer, not the files.” A multi-file feature needs the full template, and possibly an explicit sequencing note (“do X before Y; if X fails, stop”).
What never scales away, at any size, is the definition of done. Even the smallest brief should end with how finished will be recognised. If that line cannot be written, the next step is not delegation — it is thinking, and thinking is a main-session job. When delegated work does go sideways, debugging agent loops covers the failure patterns to recognise.
When the report comes back wrong anyway
Even a good brief occasionally returns work that misses. Diagnose by section, not by vibe:
- Wrong files edited — the scope section was soft. Tighten “touch” to exact paths, and restate the never-touch list.
- Right files, wrong approach — the why section was thin. The subagent filled the intent gap with a reasonable guess; add the prior decision or dead end it could not see.
- Work done, claim unverifiable — the done-definition lacked a command. “Build passes” is a claim; “build passes:
npm run build” is a check. - A wall of output — the report format was missing, so the subagent returned everything it had. Name the shape: list, table, or three bullets.
Each failure maps to one template section, which is the point of having sections at all: the fix is local, and the next brief inherits it.
How we researched this
The template is a practice document: it is organised around the three failure modes that vague briefs reliably produce. The platform mechanics it relies on — context isolation, definition files in .claude/agents/ and ~/.claude/agents/, enforced tool lists, per-agent model choice — are stated in Anthropic’s subagents documentation, checked November 2026. No delegation benchmarks are claimed; the argument is structural, not measured.
The two-minute habit
Before delegating anything non-trivial, spend two minutes filling the template, then read the “why” and “done” sections once as if you were a stranger. If a stranger could execute from them, send it. If not, the gap you just found was going to become a wrong guess, a violated constraint, or an unverifiable “done” — discovered now, in the cheap place, instead of in the returned work.
Subagents are not unreliable. Briefs are. Fix the brief, and delegation starts to deliver what it promised: work that lands.
Learn more:
- Subagents vs one long session: when splitting helps
- Agent memory patterns for long projects
- Debugging agent loops
- The context budget audit
FAQ
Why do subagents produce unusable work so often? Because the brief assumed shared context that does not exist. A subagent starts cold: it has not seen your session, your earlier decisions, or the mistake you corrected an hour ago. Anything not written in the brief does not exist for it.
How long should a subagent brief be? Long enough to carry context, constraints, and the done-definition — usually a screen, not a paragraph and not a document. If you cannot write it in ten minutes, the task itself is not yet clear enough to delegate.
What is a done-definition? A checkable statement of finished: the files changed, the test that passes, the output format. “Improve the settings pages” has no done-definition; “these three pages render without console errors and the build passes” does.
What is the difference between a brief and a subagent definition?
A brief is written per task and carries this run’s context. A definition file in .claude/agents/ is a standing subagent — name, description, tool access, model — reused across tasks. Recurring delegations with fixed constraints belong in a definition; one-off context belongs in a brief.
Should subagents report back in a set format? Yes — decide it in the brief. A short report with what changed, what was verified, and what is still open saves you re-reading the whole diff to find the one thing that matters.
Category: Claude Code & Context Engineering · Tags: #claude-code #subagents #ai-coding #context-engineering
Next step: this article is part of Claude Code guides, which covers the full topic from first setup to advanced use.