execute_plan
Execute implementation plan steps to generate and apply code changes using AI, with modes for single steps, ready steps, or full plan execution.
Instructions
Execute steps from an implementation plan, generating code changes.
This tool orchestrates the execution of plan steps, using AI to generate the actual code changes needed for each step.
Execution Modes:
single_step: Execute a specific step by number (requires step_number)
all_ready: Execute all steps whose dependencies are satisfied
full_plan: Execute steps in dependency order (respects max_steps limit)
Output:
Generated code changes for each step (preview by default)
Success/failure status for each step
Next steps that are ready to execute
Overall progress tracking
You can pass a saved plan_id instead of the full plan JSON.
Important:
By default, changes are shown as preview only (apply_changes=false)
Set apply_changes=true to actually write the generated code to files
Use stop_on_failure=true (default) to halt on first error
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plan | No | The plan as a JSON string (from create_plan output). Optional if plan_id is provided. | |
| plan_id | No | Plan ID to load from saved plans (alternative to providing plan JSON) | |
| mode | No | Execution mode (default: single_step) | single_step |
| step_number | No | Step number to execute (required for single_step mode) | |
| apply_changes | No | Whether to apply changes to files (default: false - preview only) | |
| max_steps | No | Maximum steps to execute in one call (default: 5) | |
| stop_on_failure | No | Whether to stop on first failure (default: true) | |
| additional_context | No | Additional context to provide to the AI for code generation |