Agents & Roles
Sub-agents are ephemeral Claude Code processes spawned by the orchestrator to perform specific tasks. Each agent has a role — builder, reviewer, scout, or coordinator — that determines its system prompt, behaviour, and the tools it receives. Understanding agent roles helps you build a team that covers all the work your project needs.
Agent lifecycle
Every agent goes through the following states from spawn to completion:
idleWaiting in queue, not yet startedrunningClaude Code process activedoneCompleted successfullyerrorExited with an errorcancelledStopped by cancel cascadeSpawn process
When the orchestrator calls spawn_agent, Agenties:
Roles in detail
Builder
The builder is the workhorse of the team. It receives a concrete implementation task and is expected to: read the relevant code, write the implementation, run tests, fix any failures, and post a completion summary to the mailbox.
| Attribute | Value |
|---|---|
| Typical model | claude-sonnet-4-6 or claude-opus-4-7 |
| Effort | high or xhigh |
| Max turns | 1 (re-spawned by orchestrator if follow-up needed) |
| Key MCP tools | read/write files, run shell, create_issue, send_message |
Reviewer
The reviewer reads a diff or a set of files and evaluates them against the original requirements. It posts a review-result message with one of three verdicts: approved, changes-requested, or blocked. The orchestrator uses this verdict to decide whether to re-assign to the builder or close the task.
| Attribute | Value |
|---|---|
| Typical model | claude-haiku-4-5 (fast and cheap for reviews) |
| Effort | medium |
| Key MCP tools | read files, read_messages, send_message |
| Output | review-result message with verdict + specific comments |
Scout
The scout researches the codebase, documentation, or the web and writes its findings to the vault. Scouts are spawned when the orchestrator needs context before delegating implementation — for example, "understand how authentication works in this codebase before having the builder add OAuth."
| Attribute | Value |
|---|---|
| Typical model | claude-haiku-4-5 or claude-sonnet-4-6 |
| Effort | low or medium |
| Key MCP tools | read files, grep, write_vault_note, send_message |
| Output | Vault note with findings + task-done message pointing to it |
Coordinator
The coordinator is a mini-orchestrator for complex tasks that require multiple sequential steps. It can spawn its own builders and reviewers up to a configurable maximum of MAX_COORDINATOR_TURNS(default: 10). This is useful for multi-file refactors, feature development across multiple layers, or long research-and-implement loops.
System prompts
Each agent receives a system prompt composed of three layers:
Agent statuses in the UI
| Status | Meaning |
|---|---|
| idle | Process allocated but not yet started. Will start when a slot is free. |
| running | Claude Code process active, streaming output. |
| done | Completed successfully. Review output in the Agents panel. |
| error | Exited non-zero. Check the output for the error. The orchestrator will read the failure and decide how to recover. |
| cancelled | Stopped by a cancel cascade (user clicked Stop or orchestrator cancelled all children). |