-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
What specific problem does this solve?
The experimental setting "Disable command execution in attempt_completion" was introduced in PR #4352 to test removing command execution from the attempt_completion tool. The experiment has been successful with no reported issues, and it's time to implement the originally planned permanent removal.
Who is affected: All users of Roo Code who currently rely on command execution within attempt_completion.
When this happens: Currently, users can toggle between two behaviors via the experimental setting, creating inconsistency and UI clutter.
Current behavior: The experimental toggle allows users to switch between:
- Legacy behavior:
attempt_completioncan execute commands - New behavior:
attempt_completionignores command parameters
Expected behavior: Command execution should be permanently removed from attempt_completion. Users must use execute_command → verify result → attempt_completion pattern.
Impact:
- Eliminates step-by-step verification violations
- Prevents eval cycle waste from failed tasks triggering commands
- Reduces risk of executing commands on incomplete/broken code
- Improves transparency and debugging
- Removes UI clutter and user confusion from experimental toggle
How should this be solved?
Remove the experimental setting entirely and make command execution permanently disabled in attempt_completion:
What will change:
- Remove
DISABLE_COMPLETION_COMMANDfrom experiment system - Permanently remove
commandparameter fromattempt_completiontool - Update system prompts to never mention command execution in
attempt_completion - Remove experimental toggle from settings UI
- Clean up all related localization entries
User interaction:
- Users must use
execute_commandtool separately beforeattempt_completion - Clear error messages if commands are attempted in
attempt_completion attempt_completionaccepts onlyresultparameter
How will we know it works? (Acceptance Criteria)
Given command execution is permanently removed from attempt_completion
When users complete a task
Then attempt_completion only accepts a result parameter
And any command parameter is ignored or produces a clear error
And system prompts never mention command execution in attempt_completion
But users can still execute commands via the separate execute_command tool
Given the experimental setting is removed
When users open settings
Then the "Disable command execution in attempt_completion" toggle is not visible
And the experimental section is cleaner
But all other experimental features continue to work normally
Estimated effort and complexity
Size: Medium
Reasoning: Requires coordinated changes across tool implementation, prompts, localization files, and tests. Most changes are deletions rather than complex logic.
Main challenges:
- Ensuring all references to the experiment are removed
- Updating comprehensive test suite
- Removing localization entries across all languages
Dependencies: None - this is purely removing experimental code
Technical Implementation Plan
Based on my analysis of the codebase, the following files need modification:
Core Implementation:
src/shared/experiments.ts- RemoveDISABLE_COMPLETION_COMMANDfromEXPERIMENT_IDSandexperimentConfigsMapsrc/core/tools/attemptCompletionTool.ts- Remove command parameter handling and experiment checkssrc/core/prompts/tools/attempt-completion.ts- Remove command parameter from tool description and examplessrc/core/prompts/sections/objective.ts- Remove experiment checksrc/shared/tools.ts- RemovecommandfromAttemptCompletionToolUseinterface
Localization Cleanup:
- Remove
DISABLE_COMPLETION_COMMANDentries from allwebview-ui/src/i18n/locales/*/settings.jsonfiles (18+ languages)
Test Updates:
src/core/prompts/tools/__tests__/attempt-completion.spec.ts- Update tests to only test command-free behaviorsrc/core/tools/__tests__/attemptCompletionTool.experiment.spec.ts- Remove entire file (experiment-specific tests)src/shared/__tests__/experiments.spec.ts- Update test cases removingdisableCompletionCommandwebview-ui/src/context/__tests__/ExtensionStateContext.spec.tsx- Update test expectations- Update any other test files referencing
DISABLE_COMPLETION_COMMAND
Implementation Steps:
- Remove experiment ID and configuration from experiments system
- Update
attemptCompletionTool.tsto permanently disable command execution - Update tool prompts to remove command-related content
- Remove experimental UI toggle and related localization
- Update all test files to reflect permanent behavior
- Verify no remaining references to the experiment exist
Related Discussions
- Closes Feature Request: Disable Command Execution in attempt_completion Tool #4351 - Original feature request for experimental setting
- Related to feat: add experimental flag to disable command execution in attempt_c… #4352 - PR that implemented the experimental feature (stated plan to remove if successful)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status