diff --git a/coderd/chatd/subagent.go b/coderd/chatd/subagent.go index 9bafd360e3..ec1b63a76d 100644 --- a/coderd/chatd/subagent.go +++ b/coderd/chatd/subagent.go @@ -52,9 +52,17 @@ func (p *Server) subagentTools(currentChat func() database.Chat) []fantasy.Agent "(e.g. fixing a specific bug, writing a single module, "+ "running a migration). Do NOT use for simple or quick "+ "operations you can handle directly with execute, "+ - "read_file, or write_file. The child agent receives the "+ - "same workspace tools but cannot spawn its own subagents. "+ - "After spawning, use wait_agent to collect the result.", + "read_file, or write_file - for example, reading a group "+ + "of files and outputting them verbatim does not need a "+ + "subagent. Reserve subagents for tasks that require "+ + "intellectual work such as code analysis, writing new "+ + "code, or complex refactoring. Be careful when running "+ + "parallel subagents: if two subagents modify the same "+ + "files they will conflict with each other, so ensure "+ + "parallel subagent tasks are independent. "+ + "The child agent receives the same workspace tools but "+ + "cannot spawn its own subagents. After spawning, use "+ + "wait_agent to collect the result.", func(ctx context.Context, args spawnAgentArgs, _ fantasy.ToolCall) (fantasy.ToolResponse, error) { if currentChat == nil { return fantasy.NewTextErrorResponse("subagent callbacks are not configured"), nil