-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat: add experimental flag to disable command execution in attempt_c… #4352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
daniel-lxs
reviewed
Jun 4, 2025
…emove type assertion
daniel-lxs
approved these changes
Jun 7, 2025
Member
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
It might be a good idea to expose this setting to the API configuration to allow disabling the suggested command parameter on evals and integration testing.
mrubens
approved these changes
Jun 8, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
lgtm
This PR has been approved by a maintainer
PR - Needs Review
size:XL
This PR changes 500-999 lines, ignoring generated files.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related GitHub Issue
Closes: #4351
Description
This PR adds an experimental flag to disable the
commandparameter in theattempt_completiontool. The change addresses the issue where Roo can execute commands without first verifying that the task was completed successfully, violating the principle of step-by-step verification.Key implementation details:
DISABLE_COMPLETION_COMMANDthat users can enable to test the new behaviorattemptCompletionTool.tsto check the experimental flag before executing commandsImportant: This is implemented as an experiment to test the behavior. If it works well, we will simply remove the command execution feature entirely from
attempt_completionwithout adding it as a permanent setting.Design choices:
Test Procedure
Unit Tests:
npm testto execute all testssrc/core/prompts/tools/__tests__/attempt-completion.experiment.test.ts(6 tests)src/core/tools/__tests__/attemptCompletionTool.experiment.test.ts(7 tests)Manual Testing:
Verification:
execute_commandseparately when the flag is enabledType of Change
srcor test files.Pre-Submission Checklist
npm run lint).console.log) has been removed.npm test).mainbranch.npm run changesetif this PR includes user-facing changes or dependency updates.Screenshots / Videos
Settings UI - New Experimental Toggle:

The new "Disable command execution in attempt_completion" toggle appears in the Experimental Features section
Behavior Comparison:
execute_commandtool usageDocumentation Updates
Note: Since this is an experimental feature that will be removed entirely if successful (not moved to settings), no permanent documentation is needed.
Additional Notes
Files Changed Summary:
Impact Analysis:
Future Plan:
If the experiment proves successful, we will remove the command execution capability from
attempt_completionentirely, without moving it to a permanent setting. This ensures cleaner separation of concerns and better adherence to the step-by-step verification principle.Important
Introduces an experimental flag to disable command execution in
attempt_completion, with updates to code, tests, and localization.DISABLE_COMPLETION_COMMANDflag to disable command execution inattempt_completion.attemptCompletionTool.tsto respect the new flag, preventing command execution when enabled.disableCompletionCommandtoexperiment.tsand related schemas.attempt-completion.experiment.test.tsandattemptCompletionTool.experiment.test.tsto cover both enabled and disabled states.This description was created by
for cdeef22. You can customize this summary. It will automatically update as commits are pushed.