Skip to content

Subagents And Delegation Reference

rayswaynl edited this page Jun 25, 2026 · 1 revision

Subagents and Delegation Reference

Process reference. The atom of multi-agent work on a2waspwarfare: one delegated task in its own context window. Written 2026-06-24. Part of the Agent orchestration playbook; methodology, not gameplay code.

What A Subagent Is

A subagent is a task handed to the Agent tool (also called Task). It runs in its own fresh, full context window, does its work, and returns only its final message to the orchestrator — the intermediate tool calls and file dumps stay in the subagent's context, not yours. That is the whole point: a subagent reads ten files and hands you the one-paragraph conclusion.

Two consequences:

  • Delegate reading, keep conclusions. Use a subagent when answering means sweeping many files but you only need the verdict.
  • The subagent cannot see your conversation. Its prompt must stand alone — file paths, the exact question, and any house rules it must follow.

Agent Types

Type Use for Notes
Explore "Where/how does X work?" broad read-only fan-out Reads excerpts, locates code; does not review or edit. Specify breadth ("medium" vs "very thorough").
Plan Designing an implementation before code Read-only architect; returns a step-by-step plan.
general-purpose Multi-step research or search when the target is uncertain Catch-all.
Specialized (code-reviewer, adversarial-reviewer, code-auditor, ...) Focused review or audit The adversarial reviewer tries to break the work, not compliance-check it.

On this project, prefer Explore for codebase questions instead of grepping in the main context — it keeps the orchestrator's window clean.

Model And Effort Routing

Two independent dials. Pick the cheapest that holds quality (per the repo's cost policy):

Dial Setting When
Model haiku Rote recon, log and file scraping, scripted work
Model default sonnet Normal review and implementation subagents
Model opus Critical only: security, concurrency, novel algorithms, hard debugging
Effort low / medium Routine work, even on a capable model
Effort high / xhigh / max The hardest verify or judge stages

The interactive orchestrator stays on the steering model; subagents default to Sonnet, dropping to haiku for rote work and rising to opus only for critical work.

Parallel Dispatch

Multiple Agent calls in a single message run concurrently. Dispatch independent jobs together — exploring three subsystems, or running tests while reading logs — rather than one after another. Sequential is only for true dependencies (B needs A's output).

Structured Output

When you need machine-readable results back, the fleet layer lets you hand a subagent's agent() call a schema (see Multi-agent fleet orchestration); validation happens at the tool layer, so the agent retries until its output matches — no brittle parsing of prose.

Background And Isolation

  • Background (run_in_background): long jobs (builds, installs, large sweeps) run detached; you continue and get notified on completion.
  • Worktree isolation (isolation: worktree): an agent that edits files gets its own git worktree, so parallel writers don't collide. Costs setup time and disk — use it only when agents mutate files concurrently.

Delegate Vs Inline

Delegate to a subagent Keep inline
Sweep many files or directories One known file:line lookup
Independent job that can run in parallel A step that depends on the current context
Heavy detail you don't want in the main window A quick factual answer
Adversarial review of something you wrote A trivial mechanical edit

Once you delegate a search, don't also run it yourself — wait for the result.

WASP-Specific Cautions

  • Scouts return leads, not truth. A read-only swarm's output is promoted into an owner page only after a source-check against the Chernarus mission — see Subagent discovery swarm.
  • Verify every scripting claim. Subagents routinely emit Arma 3-flavoured SQF that is wrong for OA 1.64. Classify any command hit with Arma 2 OA compatibility audit before treating it as advice.
  • Stand-alone prompts. A subagent has none of this wiki's context unless you give it the page rules and source paths in the prompt.

Continue Reading

Previous: Agent orchestration playbook | Next: Multi-agent fleet orchestration

Main map: Home | Fast path: Quickstart | Agent file: agent-context.json

Sidebar

Clone this wiki locally