Skip to content

Remove experimental setting: Make command execution permanently disabled in attempt_completion #4882

@hannesrudolph

Description

@hannesrudolph

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_completion can execute commands
  • New behavior: attempt_completion ignores 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_COMMAND from experiment system
  • Permanently remove command parameter from attempt_completion tool
  • 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_command tool separately before attempt_completion
  • Clear error messages if commands are attempted in attempt_completion
  • attempt_completion accepts only result parameter

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 - Remove DISABLE_COMPLETION_COMMAND from EXPERIMENT_IDS and experimentConfigsMap
  • src/core/tools/attemptCompletionTool.ts - Remove command parameter handling and experiment checks
  • src/core/prompts/tools/attempt-completion.ts - Remove command parameter from tool description and examples
  • src/core/prompts/sections/objective.ts - Remove experiment check
  • src/shared/tools.ts - Remove command from AttemptCompletionToolUse interface

Localization Cleanup:

  • Remove DISABLE_COMPLETION_COMMAND entries from all webview-ui/src/i18n/locales/*/settings.json files (18+ languages)

Test Updates:

  • src/core/prompts/tools/__tests__/attempt-completion.spec.ts - Update tests to only test command-free behavior
  • src/core/tools/__tests__/attemptCompletionTool.experiment.spec.ts - Remove entire file (experiment-specific tests)
  • src/shared/__tests__/experiments.spec.ts - Update test cases removing disableCompletionCommand
  • webview-ui/src/context/__tests__/ExtensionStateContext.spec.tsx - Update test expectations
  • Update any other test files referencing DISABLE_COMPLETION_COMMAND

Implementation Steps:

  1. Remove experiment ID and configuration from experiments system
  2. Update attemptCompletionTool.ts to permanently disable command execution
  3. Update tool prompts to remove command-related content
  4. Remove experimental UI toggle and related localization
  5. Update all test files to reflect permanent behavior
  6. Verify no remaining references to the experiment exist

Related Discussions

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue - In ProgressSomeone is actively working on this. Should link to a PR soon.enhancementNew feature or requestproposal

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions