Teams
Teams are a harness pattern built from named agent definitions plus the unified
task delegation core. A3S Code does not expose a separate team runner API; the
parent session stays responsible for synthesis, policy, and final verification.
Recommended Shape
- Put durable roles in
.a3s/agentsor configure additionalagentDirs. - Keep each role focused: description, prompt, allowed tools, denied tools.
- Enable
autoDelegationwhen the runtime should select high-confidence subagents. - Use
session.task(...)orsession.tasks(...)when the host already knows the lanes. - Merge child summaries, evidence references, and risks in the parent.
Custom Agent Files
Markdown agent files use Claude-compatible frontmatter, with A3S-native placement under .a3s/agents:
Tool names match case-insensitively, and an entry with parentheses such as
Bash(cargo test*) is kept as a permission pattern. Listing tools makes the
agent allow-only; disallowedTools entries are added as deny rules.
A3S also reads .claude/agents as a migration source. Prefer .a3s/agents for new projects.
Built-in Team Roles
Use these without creating files:
explore: read-only repository explorationplan: read-only implementation planninggeneral/general-purpose: multi-step implementationverification: checks, repros, and regression validationreview: findings-first code review
Manual Lanes
SDK callers can call direct helpers when the host already knows the lanes:
session.tasks(...) is the host-driven multi-item wrapper around task; it
returns a ToolResult, not a StepOutcome[]. Use session.parallel(...) when
you need one structured outcome per lane.
When the team's lane structure is fixed and should be reproducible and resumable rather than model-chosen, use the programmable combinators in Orchestration (session.parallel / session.pipeline / session.parallelResumable).
Worker Agents
Register disposable worker agents with workerAgents or registerWorkerAgent() when the role is constructed by the host instead of stored on disk:
Control how child runs resolve Ask decisions with confirmationInheritance:
'auto_approve': the child's own Ask decisions are approved automatically (default for agents with allow or deny permission rules)'deny_on_ask': the child's own Ask decisions are denied (default for agents without permission rules)'inherit_parent': the child's Ask decisions go to the parent session's confirmation provider
See Tasks for details.
Runtime State
Each delegated child is tracked by task ID. Read snapshots with
subagentTasks() / pendingSubagentTasks() (Python subagent_tasks() /
pending_subagent_tasks(), Go SubagentTasks / PendingSubagentTasks), cancel
one child with cancelSubagentTask(taskId), and cancel the parent run with
cancelRun(runId). Streaming events and run replay (runEvents(runId)) carry
the same task IDs for UI state.