Skip to content
mentoor

Topic 4 of 5 · 5 min read

Writing subagent briefs and checking their results

Goal: Write a brief a subagent can act on without the parent conversation, and check a returned report for claims that were not verified.

A brief must work for a reader who has never seen your conversation, and a report is a claim to check, not a fact to accept.

Check yourself · 1 of 3

Why must a subagent brief be self-contained?

Choose one answer

Why it matters

A subagent starts with an empty context. Whatever you do not write down does not exist for it. Anthropic's team found that short, vague instructions led subagents to duplicate work or leave gaps, and that each subagent needs a clear objective, an output format and boundaries. On the way back, the parent only sees a summary. Summaries are lossy and sometimes optimistic.

What a brief contains

  1. Goal and why. One or two sentences: what to achieve and what it is for.
  2. Scope. The exact paths it may read and edit, and what is off limits.
  3. Context it cannot guess. Decisions already made, constraints, the names of existing helpers to reuse.
  4. Acceptance. How "done" is judged: a behaviour, a test it must add, a command that must pass.
  5. Rules. For example: no commits, no dependency changes, do not run the full suite.
  6. Return format. What to report and how, including "list what you did not verify".

Checking the report

Ask of every claim: what did the subagent actually run or read? "Updated all call sites" can be checked with a grep. "Tests pass" can be checked by running them. Open the diff for the files it was allowed to touch, and confirm nothing outside the scope changed. Treat a report with no "not verified" section as suspicious.

Before and after

Weak brief:

Fix the date bug in the orders code. You know the one.

Fixed brief:

Goal: orders created after 22:00 UTC show the wrong day for users in UTC+3.
Scope: edit only src/orders/format-date.ts and its test. Read anything.
Context: use the existing parseTz() helper; do not add a date library.
Acceptance: add a test with 23:30 UTC and zone Europe/Istanbul that expects the next day; it must pass.
Rules: no commits, do not touch other files.
Return: files changed, the test name, and anything you did not verify.

What goes wrong

  • "You know the one." It does not.
  • Accepting "all done". The claim was never checked against the diff.
  • Open scope. A helpful worker fixes three unrelated things and breaks a fourth.

Examples

Catching an unverified claim

Worker report: "Renamed userId to accountId in all 14 call sites. Tests pass."

Parent check: grep -rn "userId" packages/api still returns 3 hits, and the test command was never run. The report was optimistic. Send the worker back with the three paths.

A tight return format

End of brief: "Return JSON-like lines: changed: <path>, test: <name> <pass|fail|not run>, not verified: <item>." The parent can scan this in seconds and sees at once that a test was not run.

Key points

  • A subagent knows nothing beyond the brief, so goal, scope, context, acceptance and rules must be written out.
  • Name the exact paths a subagent may edit.
  • State how done is judged, ideally as a test or a command.
  • Ask for a return format that includes what was not verified.
  • Check the report against the diff and by rerunning the checks yourself.

Common mistakes

  • Writing a brief that refers to "what we discussed".
  • Leaving scope open, so the worker edits files nobody expected.
  • Accepting a summary without reading the diff or rerunning the checks.
  • Not asking what the subagent did not verify, so gaps stay invisible.

Check yourself · 2 of 3

A worker reports "all tests pass". What is the best next step?

Choose one answer

Check yourself · 3 of 3

Which line best belongs in a brief's acceptance section?

Choose one answer

Practice items, not counted towards your mastery.

Start here