· about 25 minutes · runs on ubuntu-26.04-claude · unrated
An unrated lab. It runs on your machine with no account and no network, and everything about it — the faults, the checks, the hints and the reference solution — is in the repository. An attempt on it is recorded on your profile and never moves a rating: only rated labs do. Rated and unrated labs.
Before a branch of ~/payments is merged, ~/bin/review-diff pipes its diff to Claude Code and
asks the team's security-reviewer subagent to review it. The subagent's instructions were
written carefully and agreed by the whole team. Its reviews never arrive: the job's result says
the main agent "reviewed it itself", and nobody can tell whether the reviewer has ever run.
The team's rules for the reviewer are short. It reads; it never edits files or runs commands. It runs on Haiku — a review a day on a larger model was never in the budget.
This lab runs in a container, as learner with sudo. claude here is the real Claude Code
2.1.270, talking to a scripted model on this machine that asks for the security-reviewer on every
run; Claude Code decides for real whether that agent exists, which tools it gets and which model
it asks for. The job's JSON result is ~/review.json.
What is expected, and graded — the grader runs ~/bin/review-diff itself:
This lab runs in a container — Docker or Podman, no VM — so there is no boot to survive: the checks run once, against the state you left.
| Check | Objective |
|---|---|
| 01_the_review_runs_in_the_reviewer | Define a project subagent Claude Code can find and delegate to |
| 02_the_reviewer_can_only_read | Limit a subagent to the tools its job needs |
| 03_the_reviewer_runs_on_haiku | Choose the model a subagent runs on |
Where the lab's hints send you, level by level, as you ask for them (h, then l opens a journal section in the TUI).
4 questions on the same topic, in the lab's Theory tab. They never affect the lab's grade. Three of them, to answer here:
A team writes its reviewer subagent to `.claude/agent/reviewer.md` with valid frontmatter. The model asks for subagent_type "reviewer". What does Claude Code answer?
That the agent type is not found, listing the agents it does know
Project subagents are read from `.claude/agents/` (scanned recursively), user subagents from `~/.claude/agents/`; `.claude/agent/` is not a location Claude Code reads. The Agent tool returns "Agent type 'reviewer' not found. Available agents: …", and the main agent carries on without it. Nothing is substituted and nobody is asked.
https://code.claude.com/docs/en/sub-agents
A subagent's frontmatter has `name`, `model` and `desc:` with a good explanation, but no `description:` key. What happens?
The subagent is not loaded at all: name and description are both required
`name` and `description` are the two required fields; the description is how Claude decides when to delegate. Without it the file is not a subagent, so even an explicit request by name returns "not found" (verified with Claude Code 2.1.270). Unknown keys such as `desc` are not aliases.
https://code.claude.com/docs/en/sub-agents
A subagent meant only to review code has no `tools:` line in its frontmatter. Which tools does it get?
It inherits the tools of the session that starts it, Bash, Edit and Write included
Omitting `tools` means inheriting every tool the main thread has, MCP tools included. There is no read-only default and the description does not grant anything. A reviewer should say `tools: Read, Grep, Glob` (or use `disallowedTools`). The session's permission mode still applies to what it runs.
https://code.claude.com/docs/en/sub-agents