Stop failed goal rollover work

This commit is contained in:
Ahmed Ibrahim
2026-06-08 19:09:48 -07:00
parent 5e81410f25
commit 2ca9882d11
+4
View File
@@ -514,6 +514,7 @@ class CodexClient:
) -> None:
"""Persist the terminal status for a failed physical goal turn."""
self.thread_goal_set(state.thread_id, status=status)
self._interrupt_goal_operation(state)
def cancel_goal_operation(self, state: _GoalOperationState) -> None:
"""Best-effort cleanup after a logical goal operation is cancelled."""
@@ -521,6 +522,9 @@ class CodexClient:
self.pause_goal(state.thread_id)
except Exception:
pass
self._interrupt_goal_operation(state)
def _interrupt_goal_operation(self, state: _GoalOperationState) -> None:
turn_id = state.current_turn()
if turn_id is None:
return