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
Fixes#4882: Remove experimental setting for command execution in attempt_completion (#4884)
* Fixes#4882: Remove experimental setting for command execution in attempt_completion
- Remove DISABLE_COMPLETION_COMMAND from experiments system
- Permanently disable command execution in attempt_completion tool
- Update tool prompts to remove command parameter and examples
- Remove experimental UI toggle and localization entries (18+ languages)
- Update tests to reflect permanent behavior
- Remove experiment-specific test file
Command execution is now permanently disabled in attempt_completion.
Users must use execute_command tool separately before attempt_completion.
* refactor: simplify getAttemptCompletionDescription by removing unnecessary variables
* test: fix tests by regenerating snaps
---------
Co-authored-by: Daniel Riccio <[email protected]>
Copy file name to clipboardExpand all lines: src/core/prompts/__tests__/__snapshots__/add-custom-instructions/architect-mode-prompt.snap
+3-6Lines changed: 3 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -298,25 +298,22 @@ Example: Requesting to ask the user for the path to the frontend-config.json fil
298
298
</ask_followup_question>
299
299
300
300
## attempt_completion
301
-
Description: After each tool use, the user will respond with the result of that tool use, i.e. if it succeeded or failed, along with any reasons for failure. Once you've received the results of tool uses and can confirm that the task is complete, use this tool to present the result of your work to the user. Optionally you may provide a CLI command to showcase the result of your work. The user may respond with feedback if they are not satisfied with the result, which you can use to make improvements and try again.
301
+
Description: After each tool use, the user will respond with the result of that tool use, i.e. if it succeeded or failed, along with any reasons for failure. Once you've received the results of tool uses and can confirm that the task is complete, use this tool to present the result of your work to the user. The user may respond with feedback if they are not satisfied with the result, which you can use to make improvements and try again.
302
302
IMPORTANT NOTE: This tool CANNOT be used until you've confirmed from the user that any previous tool uses were successful. Failure to do so will result in code corruption and system failure. Before using this tool, you must ask yourself in <thinking></thinking> tags if you've confirmed from the user that any previous tool uses were successful. If not, then DO NOT use this tool.
303
303
Parameters:
304
304
- result: (required) The result of the task. Formulate this result in a way that is final and does not require further input from the user. Don't end your result with questions or offers for further assistance.
305
-
- command: (optional) A CLI command to execute to show a live demo of the result to the user. For example, use `open index.html` to display a created html website, or `open localhost:3000` to display a locally running development server. But DO NOT use commands like `echo` or `cat` that merely print text. This command should be valid for the current operating system. Ensure the command is properly formatted and does not contain any harmful instructions.
306
305
Usage:
307
306
<attempt_completion>
308
307
<result>
309
308
Your final result description here
310
309
</result>
311
-
<command>Command to demonstrate result (optional)</command>
312
310
</attempt_completion>
313
311
314
-
Example: Requesting to attempt completion with a result and command
312
+
Example: Requesting to attempt completion with a result
315
313
<attempt_completion>
316
314
<result>
317
315
I've updated the CSS
318
316
</result>
319
-
<command>open index.html</command>
320
317
</attempt_completion>
321
318
322
319
## switch_mode
@@ -449,7 +446,7 @@ You accomplish a given task iteratively, breaking it down into clear steps and w
449
446
1. Analyze the user's task and set clear, achievable goals to accomplish it. Prioritize these goals in a logical order.
450
447
2. Work through these goals sequentially, utilizing available tools one at a time as necessary. Each goal should correspond to a distinct step in your problem-solving process. You will be informed on the work completed and what's remaining as you go.
451
448
3. Remember, you have extensive capabilities with access to a wide range of tools that can be used in powerful and clever ways as necessary to accomplish each goal. Before calling a tool, do some analysis within <thinking></thinking> tags. First, analyze the file structure provided in environment_details to gain context and insights for proceeding effectively. Next, think about which of the provided tools is the most relevant tool to accomplish the user's task. Go through each of the required parameters of the relevant tool and determine if the user has directly provided or given enough information to infer a value. When deciding if the parameter can be inferred, carefully consider all the context to see if it supports a specific value. If all of the required parameters are present or can be reasonably inferred, close the thinking tag and proceed with the tool use. BUT, if one of the values for a required parameter is missing, DO NOT invoke the tool (not even with fillers for the missing params) and instead, ask the user to provide the missing parameters using the ask_followup_question tool. DO NOT ask for more information on optional parameters if it is not provided.
452
-
4. Once you've completed the user's task, you must use the attempt_completion tool to present the result of the task to the user. You may also provide a CLI command to showcase the result of your task; this can be particularly useful for web development tasks, where you can run e.g. `open index.html` to show the website you've built.
449
+
4. Once you've completed the user's task, you must use the attempt_completion tool to present the result of the task to the user.
453
450
5. The user may provide feedback, which you can use to make improvements and try again. But DO NOT continue in pointless back and forth conversations, i.e. don't end your responses with questions or offers for further assistance.
Copy file name to clipboardExpand all lines: src/core/prompts/__tests__/__snapshots__/add-custom-instructions/ask-mode-prompt.snap
+3-6Lines changed: 3 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -195,25 +195,22 @@ Example: Requesting to ask the user for the path to the frontend-config.json fil
195
195
</ask_followup_question>
196
196
197
197
## attempt_completion
198
-
Description: After each tool use, the user will respond with the result of that tool use, i.e. if it succeeded or failed, along with any reasons for failure. Once you've received the results of tool uses and can confirm that the task is complete, use this tool to present the result of your work to the user. Optionally you may provide a CLI command to showcase the result of your work. The user may respond with feedback if they are not satisfied with the result, which you can use to make improvements and try again.
198
+
Description: After each tool use, the user will respond with the result of that tool use, i.e. if it succeeded or failed, along with any reasons for failure. Once you've received the results of tool uses and can confirm that the task is complete, use this tool to present the result of your work to the user. The user may respond with feedback if they are not satisfied with the result, which you can use to make improvements and try again.
199
199
IMPORTANT NOTE: This tool CANNOT be used until you've confirmed from the user that any previous tool uses were successful. Failure to do so will result in code corruption and system failure. Before using this tool, you must ask yourself in <thinking></thinking> tags if you've confirmed from the user that any previous tool uses were successful. If not, then DO NOT use this tool.
200
200
Parameters:
201
201
- result: (required) The result of the task. Formulate this result in a way that is final and does not require further input from the user. Don't end your result with questions or offers for further assistance.
202
-
- command: (optional) A CLI command to execute to show a live demo of the result to the user. For example, use `open index.html` to display a created html website, or `open localhost:3000` to display a locally running development server. But DO NOT use commands like `echo` or `cat` that merely print text. This command should be valid for the current operating system. Ensure the command is properly formatted and does not contain any harmful instructions.
203
202
Usage:
204
203
<attempt_completion>
205
204
<result>
206
205
Your final result description here
207
206
</result>
208
-
<command>Command to demonstrate result (optional)</command>
209
207
</attempt_completion>
210
208
211
-
Example: Requesting to attempt completion with a result and command
209
+
Example: Requesting to attempt completion with a result
212
210
<attempt_completion>
213
211
<result>
214
212
I've updated the CSS
215
213
</result>
216
-
<command>open index.html</command>
217
214
</attempt_completion>
218
215
219
216
## switch_mode
@@ -346,7 +343,7 @@ You accomplish a given task iteratively, breaking it down into clear steps and w
346
343
1. Analyze the user's task and set clear, achievable goals to accomplish it. Prioritize these goals in a logical order.
347
344
2. Work through these goals sequentially, utilizing available tools one at a time as necessary. Each goal should correspond to a distinct step in your problem-solving process. You will be informed on the work completed and what's remaining as you go.
348
345
3. Remember, you have extensive capabilities with access to a wide range of tools that can be used in powerful and clever ways as necessary to accomplish each goal. Before calling a tool, do some analysis within <thinking></thinking> tags. First, analyze the file structure provided in environment_details to gain context and insights for proceeding effectively. Next, think about which of the provided tools is the most relevant tool to accomplish the user's task. Go through each of the required parameters of the relevant tool and determine if the user has directly provided or given enough information to infer a value. When deciding if the parameter can be inferred, carefully consider all the context to see if it supports a specific value. If all of the required parameters are present or can be reasonably inferred, close the thinking tag and proceed with the tool use. BUT, if one of the values for a required parameter is missing, DO NOT invoke the tool (not even with fillers for the missing params) and instead, ask the user to provide the missing parameters using the ask_followup_question tool. DO NOT ask for more information on optional parameters if it is not provided.
349
-
4. Once you've completed the user's task, you must use the attempt_completion tool to present the result of the task to the user. You may also provide a CLI command to showcase the result of your task; this can be particularly useful for web development tasks, where you can run e.g. `open index.html` to show the website you've built.
346
+
4. Once you've completed the user's task, you must use the attempt_completion tool to present the result of the task to the user.
350
347
5. The user may provide feedback, which you can use to make improvements and try again. But DO NOT continue in pointless back and forth conversations, i.e. don't end your responses with questions or offers for further assistance.
Copy file name to clipboardExpand all lines: src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-disabled.snap
+3-6Lines changed: 3 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -369,25 +369,22 @@ Example: Requesting to ask the user for the path to the frontend-config.json fil
369
369
</ask_followup_question>
370
370
371
371
## attempt_completion
372
-
Description: After each tool use, the user will respond with the result of that tool use, i.e. if it succeeded or failed, along with any reasons for failure. Once you've received the results of tool uses and can confirm that the task is complete, use this tool to present the result of your work to the user. Optionally you may provide a CLI command to showcase the result of your work. The user may respond with feedback if they are not satisfied with the result, which you can use to make improvements and try again.
372
+
Description: After each tool use, the user will respond with the result of that tool use, i.e. if it succeeded or failed, along with any reasons for failure. Once you've received the results of tool uses and can confirm that the task is complete, use this tool to present the result of your work to the user. The user may respond with feedback if they are not satisfied with the result, which you can use to make improvements and try again.
373
373
IMPORTANT NOTE: This tool CANNOT be used until you've confirmed from the user that any previous tool uses were successful. Failure to do so will result in code corruption and system failure. Before using this tool, you must ask yourself in <thinking></thinking> tags if you've confirmed from the user that any previous tool uses were successful. If not, then DO NOT use this tool.
374
374
Parameters:
375
375
- result: (required) The result of the task. Formulate this result in a way that is final and does not require further input from the user. Don't end your result with questions or offers for further assistance.
376
-
- command: (optional) A CLI command to execute to show a live demo of the result to the user. For example, use `open index.html` to display a created html website, or `open localhost:3000` to display a locally running development server. But DO NOT use commands like `echo` or `cat` that merely print text. This command should be valid for the current operating system. Ensure the command is properly formatted and does not contain any harmful instructions.
377
376
Usage:
378
377
<attempt_completion>
379
378
<result>
380
379
Your final result description here
381
380
</result>
382
-
<command>Command to demonstrate result (optional)</command>
383
381
</attempt_completion>
384
382
385
-
Example: Requesting to attempt completion with a result and command
383
+
Example: Requesting to attempt completion with a result
386
384
<attempt_completion>
387
385
<result>
388
386
I've updated the CSS
389
387
</result>
390
-
<command>open index.html</command>
391
388
</attempt_completion>
392
389
393
390
## switch_mode
@@ -533,7 +530,7 @@ You accomplish a given task iteratively, breaking it down into clear steps and w
533
530
1. Analyze the user's task and set clear, achievable goals to accomplish it. Prioritize these goals in a logical order.
534
531
2. Work through these goals sequentially, utilizing available tools one at a time as necessary. Each goal should correspond to a distinct step in your problem-solving process. You will be informed on the work completed and what's remaining as you go.
535
532
3. Remember, you have extensive capabilities with access to a wide range of tools that can be used in powerful and clever ways as necessary to accomplish each goal. Before calling a tool, do some analysis within <thinking></thinking> tags. First, analyze the file structure provided in environment_details to gain context and insights for proceeding effectively. Next, think about which of the provided tools is the most relevant tool to accomplish the user's task. Go through each of the required parameters of the relevant tool and determine if the user has directly provided or given enough information to infer a value. When deciding if the parameter can be inferred, carefully consider all the context to see if it supports a specific value. If all of the required parameters are present or can be reasonably inferred, close the thinking tag and proceed with the tool use. BUT, if one of the values for a required parameter is missing, DO NOT invoke the tool (not even with fillers for the missing params) and instead, ask the user to provide the missing parameters using the ask_followup_question tool. DO NOT ask for more information on optional parameters if it is not provided.
536
-
4. Once you've completed the user's task, you must use the attempt_completion tool to present the result of the task to the user. You may also provide a CLI command to showcase the result of your task; this can be particularly useful for web development tasks, where you can run e.g. `open index.html` to show the website you've built.
533
+
4. Once you've completed the user's task, you must use the attempt_completion tool to present the result of the task to the user.
537
534
5. The user may provide feedback, which you can use to make improvements and try again. But DO NOT continue in pointless back and forth conversations, i.e. don't end your responses with questions or offers for further assistance.
0 commit comments