@@ -264,14 +264,16 @@ def run_playbook(self, name: str, *, params: dict | None = None,
264264 def _execute (self , playbook , spec : TaskSpec , run_dir : Path , * ,
265265 resolution_mode : str = "resume" , tier : str = "?" ,
266266 resuming : bool = False , held_lock : RunLock | None = None ,
267- planned_context : RepositoryContext | None = None ) -> int :
267+ planned_context : RepositoryContext | None = None ,
268+ rerun_from : str = "" ) -> int :
268269 """Compatibility entry point; application keeps the last-run summary."""
269270 self .last_run_dir = run_dir
270271 self .last_blocked_reason = ""
271272 result = self .workflow_execution .run (
272273 playbook , spec , run_dir , resolution_mode = resolution_mode ,
273274 tier = tier , resuming = resuming , held_lock = held_lock ,
274275 planned_context = planned_context , llm = self .llm ,
276+ rerun_from = rerun_from ,
275277 )
276278 self .last_blocked_reason = result .blocked_reason
277279 return result .exit_code
@@ -294,12 +296,14 @@ def run_queue(self, specs: list[TaskSpec], *, assume_yes: bool = False,
294296 return 0
295297
296298 def resume_last (self , run_id : str = "" , * , repo : str = "" ,
297- playbook : str = "" , params : dict | None = None ) -> int :
299+ playbook : str = "" , params : dict | None = None ,
300+ rerun_from : str = "" ) -> int :
298301 """Resume a selected run, or the latest run when no id is supplied.
299302
300303 Target arguments are assertions against the saved task, never edits to
301304 it. Release launchers can therefore bind resume to an immutable campaign
302- without accidentally entering a newer, unrelated task.
305+ without accidentally entering a newer, unrelated task. `rerun_from`
306+ re-executes that playbook step and everything after it.
303307 """
304308 if run_id :
305309 try :
@@ -348,7 +352,8 @@ def resume_last(self, run_id: str = "", *, repo: str = "",
348352 print (style ("✋ cannot resume: " , "red" , "bold" ) + str (exc ))
349353 return BLOCKED_EXIT
350354 print (f"↻ resuming { run_dir .name } : { spec .describe ()} " )
351- return self ._execute (saved_playbook , spec , run_dir , resuming = True )
355+ return self ._execute (saved_playbook , spec , run_dir , resuming = True ,
356+ rerun_from = rerun_from )
352357 print ("no resumable run found" )
353358 return 1
354359
0 commit comments