Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

agent: Add back in discouragement of useless subagents (#50512)

Ben Brandta6106d2bfbbf
diff --git a/crates/agent/src/tools/spawn_agent_tool.rs b/crates/agent/src/tools/spawn_agent_tool.rs
index a54e19d6a6e..b75c4177525 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.