Architecture decision

Subagents vs Automations

Should work be delegated inside a live session or run unattended on a trigger?

The short answer

Use a subagent when a coordinator is present to assign and synthesize the task. Use automation when the same task can run safely from predefined inputs without live supervision.

Choose

Subagents and agent teams

Specialized workers that perform bounded tasks in separate contexts and return results to a coordinating agent or shared team.

  • Independent research or tests can return a concise result to a coordinator.
  • The main context would otherwise be flooded with logs or source material.
  • A specialist needs narrower tools, permissions, or instructions for one run.
Open the Subagents and agent teams guide

Choose

Automations

Repeatable agent runs started by time or events, with explicit inputs, permissions, outputs, review gates, and recovery behavior.

  • The trigger, inputs, output, owner, and completion check are known in advance.
  • Retries are idempotent and side effects have explicit approval boundaries.
  • Run logs and failures need durable operational ownership.
Open the Automations guide
Use both

How the layers combine

  1. 01

    Let a scheduled automation create a bounded task and gather required inputs.

  2. 02

    Use subagents only for independent workstreams within that run.

  3. 03

    Make the parent automation verify and persist the final result before publishing or acting.

Decision review

Questions to answer before implementation

  • Is a human or coordinator available when ambiguity appears?
  • Can tasks be partitioned without conflicting writes?
  • Can retries duplicate messages, deployments, or charges?
  • Are permissions inherited and constrained as expected?
  • Can operators reconstruct and recover a failed run?

Evidence ledger

Primary documentation for both sides

Reviewed July 26, 2026. Use the provider documentation for current configuration and security behavior.