Task Manager
Use task_manager as the team lead's durable control plane. It is scoped to
the current workflow execution and only permits assignment to agents connected
to this lead's input-teammates handle.
Required workflow
- Call
list_tasks with include_history=true before assigning work so you
do not duplicate a mission from an earlier workflow execution.
- Split independent work into bounded tasks with explicit acceptance criteria.
- Call
assign_task once per mission. Use the connected teammate node ID or
the exact delegate name reported by the lead's available teammate list.
Do not call delegate_to_* directly; delegate descriptors are internal
dispatch identities, not the lead's task-creation interface.
- Independent tasks may be assigned together. The durable queue starts at most
three descendants across the whole agent tree; excess tasks remain queued.
After
assign_task returns queued, report that delegation started and
return immediately. Do not poll or wait in the assigning invocation.
- When a teammate submits work or an attempt fails, call
get_task, then use
inspect_task_trace before retrying, reassigning, or reporting a terminal
failure. Start with detail="summary"; use failures or a paginated
timeline only when the summary does not explain the outcome. For large
histories use detail="search" with a narrow query, inspect the returned
context lines, and follow next_cursor until the match is found or the
cursor is empty. Prefer categories and all_terms over broad searches.
Copy task.id to task_id and
task.revision to expected_revision for the review mutation.
- Choose exactly one review outcome:
accept_task when the result satisfies the task;
modify_task for blocked or queued work;
retry_task when the mission is still valid;
reassign_task to another connected teammate with revision context;
cancel_task when the work is no longer needed.
- Call
finish_team only after every required task is accepted or intentionally
cancelled. Synthesize accepted results in the final report and disclose any
unresolved failure.
Operations
| Operation |
Purpose |
Important arguments |
assign_task |
Persist and queue a bounded mission |
title, mission, assignee_node_id or delegate_name, optional context, acceptance_criteria, depends_on |
list_tasks |
Inspect current or historical tasks |
optional status_filter, include_history |
get_task |
Review one task and all attempts |
task_id |
inspect_task_trace |
Inspect or grep the task attempt's sanitized Temporal events |
task_id; optional attempt, detail, cursor, limit; search supports query, search_mode, categories, context_lines, scan_limit |
modify_task |
Change queued/blocked work |
task_id, expected_revision, changed task fields |
cancel_task |
Cancel queued or running work |
task_id, expected_revision, reason |
retry_task |
Queue a new attempt |
task_id, expected_revision, optional revision context |
reassign_task |
Queue a new attempt for another teammate |
task_id, expected_revision, new connected assignee |
accept_task |
Record lead approval of submitted work |
task_id, expected_revision |
finish_team |
Finalize after the review barrier clears |
optional summary |
If exactly one task is submitted in the current execution, accept_task may
omit task_id and expected_revision; the runtime safely resolves that single
task and its current revision. If zero or multiple submissions await review,
you must call list_tasks or get_task and pass both fields. Never guess.
mark_done is a deprecated compatibility alias for accept_task. Never use it
to discard history.
State model
blocked: waiting for dependencies.
queued: durable and waiting for a concurrency permit.
running: owned by a teammate.
submitted: teammate finished; lead review is required.
accepted: lead approved the work.
failed: no automatic attempt remains.
cancelled: intentionally stopped; may be revised and reassigned.
Do not treat submitted as finished team work. Do not poll a running task;
taskTrigger starts a separate review invocation carrying the owning execution.
Do not invent teammate IDs, team IDs, or
execution IDs—the runtime supplies authority and rejects cross-team access.
Trace output is intentionally sanitized and scoped to the persisted task
execution. Never request or infer raw Temporal workflow IDs.
Trace search is a bounded grep-like read over normalized event metadata, never
raw payloads. A call scans at most 500 events and returns only matches plus up
to five surrounding events. Continue from next_cursor; do not restart from
the beginning or load the entire timeline when a targeted search is sufficient.
Team Monitor interpretation
Team Monitor is read-only. It shows graph-connected teammates immediately and
merges their persisted working/idle status during execution. Its Done count
means accepted, not merely submitted. Use Task Manager—not Team Monitor—to
accept, retry, modify, reassign, cancel, or finish work.
1---2name: task-manager3description: Coordinate durable team tasks by assigning connected teammates, reviewing results, and accepting, retrying, reassigning, or cancelling work.4---56# Task Manager78Use `task_manager` as the team lead's durable control plane. It is scoped to9the current workflow execution and only permits assignment to agents connected10to this lead's `input-teammates` handle.1112## Required workflow13141. Call `list_tasks` with `include_history=true` before assigning work so you15 do not duplicate a mission from an earlier workflow execution.162. Split independent work into bounded tasks with explicit acceptance criteria.173. Call `assign_task` once per mission. Use the connected teammate node ID or18 the exact delegate name reported by the lead's available teammate list.19 Do not call `delegate_to_*` directly; delegate descriptors are internal20 dispatch identities, not the lead's task-creation interface.214. Independent tasks may be assigned together. The durable queue starts at most22 three descendants across the whole agent tree; excess tasks remain queued.23 After `assign_task` returns `queued`, report that delegation started and24 return immediately. Do not poll or wait in the assigning invocation.255. When a teammate submits work or an attempt fails, call `get_task`, then use26 `inspect_task_trace` before retrying, reassigning, or reporting a terminal27 failure. Start with `detail="summary"`; use `failures` or a paginated28 `timeline` only when the summary does not explain the outcome. For large29 histories use `detail="search"` with a narrow `query`, inspect the returned30 context lines, and follow `next_cursor` until the match is found or the31 cursor is empty. Prefer `categories` and `all_terms` over broad searches.32 Copy `task.id` to `task_id` and33 `task.revision` to `expected_revision` for the review mutation.346. Choose exactly one review outcome:35 - `accept_task` when the result satisfies the task;36 - `modify_task` for blocked or queued work;37 - `retry_task` when the mission is still valid;38 - `reassign_task` to another connected teammate with revision context;39 - `cancel_task` when the work is no longer needed.407. Call `finish_team` only after every required task is accepted or intentionally41 cancelled. Synthesize accepted results in the final report and disclose any42 unresolved failure.4344## Operations4546| Operation | Purpose | Important arguments |47|---|---|---|48| `assign_task` | Persist and queue a bounded mission | `title`, `mission`, `assignee_node_id` or `delegate_name`, optional `context`, `acceptance_criteria`, `depends_on` |49| `list_tasks` | Inspect current or historical tasks | optional `status_filter`, `include_history` |50| `get_task` | Review one task and all attempts | `task_id` |51| `inspect_task_trace` | Inspect or grep the task attempt's sanitized Temporal events | `task_id`; optional `attempt`, `detail`, `cursor`, `limit`; search supports `query`, `search_mode`, `categories`, `context_lines`, `scan_limit` |52| `modify_task` | Change queued/blocked work | `task_id`, `expected_revision`, changed task fields |53| `cancel_task` | Cancel queued or running work | `task_id`, `expected_revision`, `reason` |54| `retry_task` | Queue a new attempt | `task_id`, `expected_revision`, optional revision context |55| `reassign_task` | Queue a new attempt for another teammate | `task_id`, `expected_revision`, new connected assignee |56| `accept_task` | Record lead approval of submitted work | `task_id`, `expected_revision` |57| `finish_team` | Finalize after the review barrier clears | optional summary |5859If exactly one task is `submitted` in the current execution, `accept_task` may60omit `task_id` and `expected_revision`; the runtime safely resolves that single61task and its current revision. If zero or multiple submissions await review,62you must call `list_tasks` or `get_task` and pass both fields. Never guess.6364`mark_done` is a deprecated compatibility alias for `accept_task`. Never use it65to discard history.6667## State model6869- `blocked`: waiting for dependencies.70- `queued`: durable and waiting for a concurrency permit.71- `running`: owned by a teammate.72- `submitted`: teammate finished; lead review is required.73- `accepted`: lead approved the work.74- `failed`: no automatic attempt remains.75- `cancelled`: intentionally stopped; may be revised and reassigned.7677Do not treat `submitted` as finished team work. Do not poll a running task;78`taskTrigger` starts a separate review invocation carrying the owning execution.79Do not invent teammate IDs, team IDs, or80execution IDs—the runtime supplies authority and rejects cross-team access.81Trace output is intentionally sanitized and scoped to the persisted task82execution. Never request or infer raw Temporal workflow IDs.8384Trace search is a bounded grep-like read over normalized event metadata, never85raw payloads. A call scans at most 500 events and returns only matches plus up86to five surrounding events. Continue from `next_cursor`; do not restart from87the beginning or load the entire timeline when a targeted search is sufficient.8889## Team Monitor interpretation9091Team Monitor is read-only. It shows graph-connected teammates immediately and92merges their persisted `working`/`idle` status during execution. Its Done count93means `accepted`, not merely `submitted`. Use Task Manager—not Team Monitor—to94accept, retry, modify, reassign, cancel, or finish work.