diff --git a/codeflash/optimization/function_optimizer.py b/codeflash/optimization/function_optimizer.py index daa14f2b8..131d1e44e 100644 --- a/codeflash/optimization/function_optimizer.py +++ b/codeflash/optimization/function_optimizer.py @@ -1047,7 +1047,12 @@ def find_and_process_best_optimization( coverage_message=coverage_message, git_remote=self.args.git_remote, ) - if self.args.all or env_utils.get_pr_number() or (self.args.file and not self.args.function): + if ( + self.args.all + or env_utils.get_pr_number() + or self.args.replay_test + or (self.args.file and not self.args.function) + ): self.write_code_and_helpers( self.function_to_optimize_source_code, original_helper_code,