You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .agents/base2/base2.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -304,7 +304,7 @@ ${buildArray(
304
304
useEditor&&
305
305
'- IMPORTANT: You must spawn the editor agent to implement the changes after you have gathered all the context you need. This agent will do the best job of implementing the changes so you must spawn it for all non-trivial changes. Do not pass any prompt or params to the editor agent when spawning it. It will make its own best choices of what to do.',
306
306
isMax&&
307
-
`- IMPORTANT: You must spawn the editor-best-of-n-max agent to implement non-trivial code changes, since it will generate the best code changes from multiple implementation proposals. This is the best way to make high quality code changes -- strongly prefer using this agent over the str_replace or write_file tools, unless the change is very straightforward and obvious.`,
307
+
`- IMPORTANT: You must spawn the editor-best-of-n-max agent to implement non-trivial code changes, since it will generate the best code changes from multiple implementation proposals. This is the best way to make high quality code changes -- strongly prefer using this agent over the str_replace or write_file tools, unless the change is very straightforward and obvious. Do not pass any prompt or params to the editor agent when spawning it. It will make its own best choices of what to do.`,
308
308
(isDefault||isFast)&&
309
309
'- Implement the changes using the str_replace or write_file tools.',
@@ -114,12 +109,10 @@ Try to select an implementation that fulfills all the requirements in the user's
114
109
## Response Format
115
110
116
111
${
117
-
isSonnet
118
-
? `Use <think> tags to briefly consider the implementations as needed to pick the best implementation.
119
-
120
-
If the best one is obvious or the implementations are very similar, you may not need to think very much (a few words suffice) or you may not need to use think tags at all, just pick the best one and output it. You have a dual goal of picking the best implementation and being fast (using as few words as possible).
112
+
isSonnet||isOpus
113
+
? `Use <think> tags to write out your thoughts about the implementations as needed to pick the best implementation. IMPORTANT: You should think really really hard to make sure you pick the absolute best implementation! As soon as you know for sure which implementation is the best, you should output your choice.
121
114
122
-
Then, do not write any other explanations AT ALL. You should directly output a single tool call to set_output with the selected implementationId.`
115
+
Then, do not write any other explanations AT ALL. You should directly output a single tool call to set_output with the selected implementationId and short reason.`
123
116
: `Output a single tool call to set_output with the selected implementationId. Do not write anything else.`
Copy file name to clipboardExpand all lines: .agents/editor/best-of-n/editor-best-of-n.ts
+10-13Lines changed: 10 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ export function createBestOfNEditor(
52
52
properties: {
53
53
n: {
54
54
type: 'number',
55
-
description: `Number of parallel implementor agents to spawn. Defaults to ${isDefault ? 4 : 5}. Use fewer for simple tasks and max of 10 for complex tasks.`,
55
+
description: `Number of parallel implementor agents to spawn. Defaults to ${isMax ? 4 : 3}. Use fewer for simple tasks and max of 10 for complex tasks.`,
56
56
},
57
57
},
58
58
},
@@ -73,7 +73,7 @@ function* handleStepsDefault({
73
73
}: AgentStepContext): ReturnType<
74
74
NonNullable<SecretAgentDefinition['handleSteps']>
75
75
>{
76
-
constDEFAULT_N=4
76
+
constDEFAULT_N=3
77
77
constselectorAgent='best-of-n-selector'
78
78
constn=Math.min(
79
79
10,
@@ -235,7 +235,7 @@ function* handleStepsMax({
235
235
}: AgentStepContext): ReturnType<
236
236
NonNullable<SecretAgentDefinition['handleSteps']>
237
237
>{
238
-
constMAX_N=5
238
+
constMAX_N=4
239
239
constselectorAgent='best-of-n-selector-opus'
240
240
constn=Math.min(
241
241
10,
@@ -296,6 +296,10 @@ function* handleStepsMax({
296
296
implementorResults,
297
297
)asany[]
298
298
299
+
logger.info(
300
+
{ implementorResults, spawnedImplementations },
301
+
'spawnedImplementations',
302
+
)
299
303
// Extract all the plans from the structured outputs
Copy file name to clipboardExpand all lines: .agents/editor/best-of-n/editor-implementor.ts
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -72,12 +72,14 @@ ${
72
72
isGpt5||isGemini
73
73
? ``
74
74
: `
75
-
You can also use <think> tags interspersed between tool calls to think about the best way to implement the changes. Keep these thoughts very brief. You may not need to use think tags at all.
75
+
IMPORTANT: Before you start writing your implementation, you should use <think> tags to think about the best way to implement the changes. You should think really really hard to make sure you implement the changes in the best way possible. Take as much time as you to think through all the cases to produce the best changes.
76
+
77
+
You can also use <think> tags interspersed between tool calls to think about the best way to implement the changes.
76
78
77
79
<example>
78
80
79
81
<think>
80
-
[ Thoughts about the best way to implement the feature ]
82
+
[ Long think about the best way to implement the changes ]
81
83
</think>
82
84
83
85
<codebuff_tool_call>
@@ -99,7 +101,7 @@ You can also use <think> tags interspersed between tool calls to think about the
99
101
</example>`
100
102
}
101
103
102
-
After the edit tool calls, you can optionally mention any follow-up steps to take, like deleting a file, or a sepcific way to validate the changes. There's no need to use the set_output tool as your entire response will be included in the output.
104
+
After the edit tool calls, you can optionally mention any follow-up steps to take, like deleting a file, or a specific way to validate the changes. There's no need to use the set_output tool as your entire response will be included in the output.
0 commit comments