- Delegation accuracy — does the parent delegate the right tasks to it, and only those? See Writing subagent descriptions for that half.
- Execution and return quality — given a task, does the subagent produce a deliverable the parent can act on? This page covers that half.
Designing test cases
A test case has three parts:- Task: the delegation the parent would send — objective, boundaries, expected deliverable.
- Expected output: a human-readable description of what success looks like.
- Input state (optional): files or repository state the subagent works with.
evals.json
- Start with 2-3 cases. Expand after the first round of results.
- Vary the phrasing. Some tasks terse, some with context, some where the deliverable is buried in a bigger request.
- Cover the blocked path. Include at least one case the subagent cannot complete, and grade the blocked report itself: reason, missing resources, state left behind.
Running evals
Run each test case twice: once with the subagent and once without it (the parent doing the work inline, or a previous version of the subagent). The baseline is what makes the comparison meaningful. Each run should start from a clean context. Harnesses with subagent support isolate runs naturally; otherwise use a fresh session per run. For each run, record:- The final report the parent received
- Token count and duration
- The execution trace (what the subagent actually did)
timing.json
Writing assertions
Assertions are verifiable statements about the report. The deliverable shape itself is assertable:"The report starts with a Status line"— structural."The summary answers where rate limiting is enforced without requiring the artifacts"— the stand-alone rule."Every path listed under Artifacts exists"— programmatically verifiable, and worth automating."Notes disclose the assumption made about the missing config"— for judgment calls.
"The report is good"— too vague to grade."The summary uses the exact phrase 'rate limiting middleware'"— too brittle.
Grading outputs
Grade each assertion against the actual report and record PASS or FAIL with specific evidence — quote the report, don’t state an opinion.- Require concrete evidence for a PASS. If an assertion says “the summary names the enforcement point” and the summary only says “middleware somewhere in the request pipeline”, that’s a FAIL.
- Grade the summary against the whole report. The rule is that the parent can act on the summary alone; check whether that’s true, not whether the summary is present.
- Review the assertions too. Assertions that always pass in both configurations are measuring the baseline, not the subagent.
Aggregating and iterating
After grading, compute the delta between configurations:benchmark.json
- Failed assertions point to gaps in the body — a missing step, an ambiguous instruction.
- Human feedback on the reports points to broader quality issues.
- Execution traces reveal why: instructions the subagent ignored, wasted detours, reports heavier than the parent needed.
The loop
- Give the eval signals and the current subagent file to an agent and ask for proposed changes.
- Review and apply the changes.
- Rerun all test cases from clean context.
- Grade, aggregate, review with a human. Repeat.
Next steps
- Writing subagent descriptions — If the subagent executes well but rarely gets delegated to, the description is the bottleneck.
- Designing deliverables — Shape the report the evals are grading.