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
@@ -265,13 +277,15 @@ function buildImplementationInstructionsPrompt({
265
277
isMax,
266
278
isLite,
267
279
hasNoValidation,
280
+
useEditor,
268
281
}: {
269
282
isSonnet: boolean
270
283
isFast: boolean
271
284
isDefault: boolean
272
285
isMax: boolean
273
286
isLite: boolean
274
287
hasNoValidation: boolean
288
+
useEditor: boolean
275
289
}){
276
290
return`Act as a helpful assistant and freely respond to the user's request however would be most helpful to the user. Use your judgement to orchestrate the completion of the user's request using your specialized sub-agents and tools as needed. Take your time and be comprehensive. Don't surprise the user. For example, don't modify files if the user has not asked you to do so at least implicitly.
277
291
@@ -287,6 +301,8 @@ ${buildArray(
287
301
`- For any task requiring 3+ steps, use the write_todos tool to write out your step-by-step implementation plan. Include ALL of the applicable tasks in the list.${isFast ? '' : ' You should include a step to review the changes after you have implemented the changes.'}:${hasNoValidation ? '' : ' You should include at least one step to validate/test your changes: be specific about whether to typecheck, run tests, run lints, etc.'} You may be able to do reviewing and validation in parallel in the same step. Skip write_todos for simple tasks like quick edits or answering questions.`,
288
302
isLite&&
289
303
'- IMPORTANT: You must spawn the editor-gpt-5 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 changes.',
304
+
useEditor&&
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.',
290
306
isMax&&
291
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.`,
292
308
(isDefault||isFast)&&
@@ -308,15 +324,19 @@ function buildImplementationStepPrompt({
308
324
isMax,
309
325
hasNoValidation,
310
326
isSonnet,
327
+
useEditor,
311
328
}: {
312
329
isFast: boolean
313
330
isMax: boolean
314
331
hasNoValidation: boolean
315
332
isSonnet: boolean
333
+
useEditor: boolean
316
334
}){
317
335
returnbuildArray(
318
336
isMax&&
319
337
`Keep working until the user's request is completely satisfied${!hasNoValidation ? ' and validated' : ''}, or until you require more information from the user.`,
338
+
useEditor&&
339
+
`You must spawn the 'editor' agent to implement code changes, since it will do the best job of implementing the changes.`,
320
340
isMax&&
321
341
`You must spawn the 'editor-best-of-n-max' agent to implement code changes, since it will generate the best code changes.`,
322
342
isMax&&'Spawn the thinker-best-of-n-opus to solve complex problems.',
'Expert code editor. Do not specify an input prompt for this agent; it inherits the context of the entire conversation with the user. Make sure to read any files intended to be edited before spawning this agent as it cannot read files on its own.',
12
+
"Expert code editor that implements code changes based on the user's request. Do not specify an input prompt for this agent; it inherits the context of the entire conversation with the user. Make sure to read any files intended to be edited before spawning this agent as it cannot read files on its own.",
@@ -52,7 +52,35 @@ OR for new files or major rewrites:
52
52
}
53
53
</codebuff_tool_call>
54
54
55
-
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.
55
+
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.
56
+
57
+
You can also use <think> tags interspersed between tool calls to think about the best way to implement the changes.
58
+
59
+
<example>
60
+
61
+
<think>
62
+
[ Long think about the best way to implement the changes ]
63
+
</think>
64
+
65
+
<codebuff_tool_call>
66
+
[ First tool call to implement the feature ]
67
+
</codebuff_tool_call>
68
+
69
+
<codebuff_tool_call>
70
+
[ Second tool call to implement the feature ]
71
+
</codebuff_tool_call>
72
+
73
+
<think>
74
+
[ Thoughts about a tricky part of the implementation ]
75
+
</think>
76
+
77
+
<codebuff_tool_call>
78
+
[ Third tool call to implement the feature ]
79
+
</codebuff_tool_call>
80
+
81
+
</example>
82
+
83
+
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. You should not summarize your changes, just stop when you're done. There's no need to use the set_output tool as your entire response will be included in the output.
56
84
57
85
Your implementation should:
58
86
- Be complete and comprehensive
@@ -110,5 +138,8 @@ Write out your complete implementation now, formatting all changes as tool calls
0 commit comments