From a6106d2bfbbf5bb1a1d07506a83e1d0f1c1fbee9 Mon Sep 17 00:00:00 2001 From: Ben Brandt Date: Mon, 2 Mar 2026 18:29:22 +0100 Subject: [PATCH] agent: Add back in discouragement of useless subagents (#50512) Release Notes: - N/A --- crates/agent/src/tools/spawn_agent_tool.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/agent/src/tools/spawn_agent_tool.rs b/crates/agent/src/tools/spawn_agent_tool.rs index a54e19d6a6ebaa3422c43152ba91b03c12b16ce8..b75c41775258db49577024dca3eb1770937e52e8 100644 --- a/crates/agent/src/tools/spawn_agent_tool.rs +++ b/crates/agent/src/tools/spawn_agent_tool.rs @@ -16,6 +16,8 @@ use crate::{AgentTool, ThreadEnvironment, ToolCallEventStream, ToolInput}; /// - Run multiple tasks in parallel. /// - Delegate a self-contained task where you only need the final outcome. /// +/// Do NOT use this tool for tasks you could accomplish directly with one or two tool calls (e.g. reading a file, running a single command). +/// /// You will receive only the agent's final message as output. /// /// **New session** (no session_id): Creates a new agent that does NOT see your conversation history. Include all relevant context (file paths, requirements, constraints) in the message.