Skip to content

Commit 7056e72

Browse files
committed
Prompt spawn agents tool to not use it for tools
1 parent cf40600 commit 7056e72

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

common/src/tools/params/tool/spawn-agents.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ The prompt field is a simple string, while params is a JSON object that gets val
3737
3838
Each agent available is already defined as another tool, or, dynamically defined later in the conversation.
3939
40+
**IMPORTANT**: \`agent_type\` must be an actual agent name (e.g., \`commander\`, \`code-searcher\`, \`opus-agent\`), NOT a tool name like \`read_files\`, \`str_replace\`, \`code_search\`, etc. If you need to call a tool, use it directly as a tool call instead of wrapping it in spawn_agents.
41+
4042
You can call agents either as direct tool calls (e.g., \`example-agent\`) or use \`spawn_agents\`. Both formats work, but **prefer using spawn_agents** because it allows you to spawn multiple agents in parallel for better performance. Both use the same schema with nested \`prompt\` and \`params\` fields.
4143
4244
**IMPORTANT**: Many agents have REQUIRED fields in their params schema. Check the agent's schema before spawning - if params has required fields, you MUST include them in the params object. For example, code-searcher requires \`searchQueries\`, commander requires \`command\`.

0 commit comments

Comments
 (0)