dispatch_subworker
Spawn a focused child agent (subworker) for a narrowly-scoped task. Use this ONLY when (a) the work is parallelisable across siblings, (b) it benefits from a narrow tool list that keeps context small, or (c) you need a different model (e.g. planner_opus for Opus-level planning, registry_prober for cheap Haiku probes). Default execution stays single-loop in the parent agent; reach for subworkers when one of those three conditions clearly applies. Each subworker gets its own iteration budget (default 20) and its own narrow tool list keyed by worker_type. Workers do NOT see each other's transcripts unless share_context_with names a sibling explicitly.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | Yes | Concise task brief for the subworker. Include the specific scope (cluster, namespace, resource names) and the expected output shape. | |
| scope | No | Optional scope hints to bias the subworker's search: namespace, stack_name, draft_id. | |
| worker_type | Yes | Which subworker type to spawn. Each type has a pre-baked system prompt and narrow tool list: - cluster_explorer: read-only investigation - repo_explorer: read-only GitHub repository investigation (files, code search, CI runs) - manifest_author: draft/edit one manifest or Helm release - policy_auditor: RBAC / NetworkPolicy / OPA / Kyverno scan - incident_diagnoser: crashloop / pending / scheduling root cause - registry_prober: chart-existence and image-manifest probes (Haiku) - planner_opus: decompose a complex multi-stage turn into a todo list (Opus) | |
| max_iterations | No | Per-subworker iteration budget (default 20, max 40). | |
| requires_critic | No | When true, the subworker's final output is run through the Critic regardless of the default gating rules. | |
| share_context_with | No | Optional list of sibling subworker_ids whose transcripts this subworker should be allowed to read. Default is isolation. |