You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5c949d7
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/reference/tools.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,7 +76,7 @@ Plan mode is a constrained working state: once entered, `Write` and `Edit` are r
76
76
| --- | --- | --- |
77
77
|`TodoList`| Auto-allow | Manage a task to-do list |
78
78
79
-
**`TodoList`** maintains a visible subtask list across multi-step operations; state is stored within the Agent session. The `todos` parameter accepts an array where each item has a `title` and `status` (`pending` / `in_progress` / `done`). Omitting `todos` queries the current list; passing an empty array clears it.
79
+
**`TodoList`** maintains a visible subtask list across multi-step operations; state is stored within the Agent session. The `todos` parameter accepts an array where each item has a `title` and `status` (`pending` / `in_progress` / `done`). TodoWrite-compatible items can use `content`, `activeForm`, and `completed`; `done` and `completed` are equivalent with either item shape. Omitting `todos` queries the current list; passing an empty array clears it.
80
80
81
81
## Collaboration Tools
82
82
@@ -97,7 +97,7 @@ Each entry in `items` launches one new subagent: without `prompt_template`, ever
97
97
98
98
Pass `subagent_type` to choose the profile used by every spawned subagent, or omit it to use `coder`. Pass `model` and `effort` to run this workflow's subagents on a different model than the agent orchestrating them — a cheaper or faster model for mechanical work, for example; both apply to every subagent in the call, and omitting them falls back to the subagent profile's own settings and then to the calling agent's. A `model` the provider cannot resolve falls back to the calling agent's model rather than failing the run.
99
99
100
-
Without `resume_agent_ids`, the tool requires at least 2 items; with `resume_agent_ids`, it can resume one or more existing subagents. The tool supports up to 128 total subagents, waits for all of them to finish, and returns an aggregated report. Workflow subagents have no automatic timeout; they run until completion, failure, or user cancellation.
100
+
Without `resume_agent_ids`, the tool requires at least 2 items; with `resume_agent_ids`, it can resume one or more existing subagents. Calls that fail these plan checks are rejected before an approval request is shown. The tool supports up to 128 total subagents, waits for all of them to finish, and returns an aggregated report. Workflow subagents have no automatic timeout; they run until completion, failure, or user cancellation.
101
101
102
102
If a model response calls `DynamicWorkflow`, that call must be the only tool call in the response; to run several workflows, call one `DynamicWorkflow`, wait for its result, then call the next, or combine the work into a single workflow.
Copy file name to clipboardExpand all lines: packages/agent-core/src/tools/builtin/collaboration/dynamic-workflow.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
Launch multiple subagents from complete prompts, one prompt template, existing agent resumes, or a combination.
2
2
3
-
Use DynamicWorkflow when several independent subagents should run in parallel. Without `prompt_template`, every `items` entry is a complete subagent prompt. When many subagents should run the same kind of task over different inputs, provide a template whose placeholder is exactly `{{item}}`. For example, with `prompt_template` set to `Review {{item}} for likely regressions.` and `items` set to `["src/a.ts", "src/b.ts"]`, DynamicWorkflow launches two new subagents with those two concrete prompts.
3
+
Use DynamicWorkflow when several independent subagents should run in parallel. Without `resume_agent_ids`, provide at least two non-empty items. Without `prompt_template`, every `items` entry is a complete subagent prompt. When many subagents should run the same kind of task over different inputs, provide a template whose placeholder is exactly `{{item}}`. For example, with `prompt_template` set to `Review {{item}} for likely regressions.` and `items` set to `["src/a.ts", "src/b.ts"]`, DynamicWorkflow launches two new subagents with those two concrete prompts.
4
4
5
5
Use `resume_agent_ids` to continue subagents that already exist from earlier work, such as ones that failed: map each agent id to the prompt for that resumed subagent (usually `continue` if no extra information is needed). You may combine `resume_agent_ids` with `items` in the same call to resume existing subagents and launch new ones. Do not duplicate resumed work in `items`.
Copy file name to clipboardExpand all lines: packages/agent-core/src/tools/builtin/collaboration/dynamic-workflow.ts
+10-4Lines changed: 10 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -88,7 +88,7 @@ export const DynamicWorkflowToolInputSchema = z
88
88
.array(z.string())
89
89
.optional()
90
90
.describe(
91
-
`Each item launches one new subagent. Items fill ${PROMPT_TEMPLATE_PLACEHOLDER} when prompt_template is provided; otherwise they are complete prompts.`,
91
+
`Each item launches one new subagent. Without resume_agent_ids, provide at least two non-empty items. Items fill ${PROMPT_TEMPLATE_PLACEHOLDER} when prompt_template is provided; otherwise they are complete prompts.`,
Copy file name to clipboardExpand all lines: packages/agent-core/src/tools/builtin/state/todo-list.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Use this tool to maintain a structured TODO list as you work through a multi-ste
20
20
21
21
**How to use:**
22
22
- Call with `todos: [...]` to replace the full list. Use `title` plus an optional present-continuous `activeForm`; statuses are pending / in_progress / done.
23
-
- TodoWrite-compatible `content`, required `activeForm`, and completed status are also accepted.
23
+
- TodoWrite-compatible `content`, required `activeForm`, and completed status are also accepted.`done` and `completed` are equivalent with either item shape.
24
24
- Call with no arguments to retrieve the current list without changing it.
25
25
- Call with `todos: []` to clear the list.
26
26
- Keep titles short and actionable (e.g. "Read session-control.ts", "Add planMode flag to TurnManager").
0 commit comments