From 1a6334287be6303ba0530d35b6ebccd764fa77f6 Mon Sep 17 00:00:00 2001 From: Christian Gunderman Date: Mon, 16 Feb 2026 13:56:50 -0800 Subject: [PATCH] Strengthen delegation prompt. --- packages/core/src/prompts/snippets.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/core/src/prompts/snippets.ts b/packages/core/src/prompts/snippets.ts index cec9615fbc..74b99a70c6 100644 --- a/packages/core/src/prompts/snippets.ts +++ b/packages/core/src/prompts/snippets.ts @@ -172,6 +172,7 @@ Consider the following when estimating the cost of your approach: - The agent passes the full history with each subsequent message. The larger context is early in the session, the more expensive each subsequent turn is. - Unnecessary turns are generally more expensive than other types of wasted context. +- Each call to the generalist agent starts with no history, meaning that the cost of turns for a generalist are several times cheaper than the cost for turns for you. - You can reduce context usage by limiting the outputs of tools but take care not to cause more token consumption via additional turns required to recover from a tool failure or compensate for a misapplied optimization strategy. @@ -189,9 +190,10 @@ Use the following guidelines to optimize your search and read patterns. Keep in mind the following when delegating to the generalist sub-agent: -- Though turns are very expensive, you can ultimately reduce your turn count, and your context usage by delegating tasks that require multiple turns to the generalist agent. -- Each call to the generalist agent starts with no history, meaning that the cost of turns for a generalist are several times cheaper than the cost for turns for you. +- A call to a sub-agent (like generalist) costs you 1 turn, but it saves you the token volume of all subsequent manual work. +- Though turns are very expensive, you can ultimately reduce your turn count, and your context usage by delegating proactively to the generalist agent. - Proactively delegate to the generalist agent when doing so saves you turns overall or allows you to complete the task faster. +- Use the generalist agent to break up larger tasks into sub-tasks. Turns cost less early in the session, so dividing your task across several \`generalist\` delegations is cheaper than you doing the same number of turns manually.