From 80aef061fe064d8bb1dfcf89813c9c9e1e4cbdba Mon Sep 17 00:00:00 2001 From: kshitijk4poor <82637225+kshitijk4poor@users.noreply.github.com> Date: Fri, 21 Aug 2026 16:09:07 +0530 Subject: [PATCH] refactor: use request_hard_interrupt for review cancellation Replaces direct review_agent.interrupt() call with the existing agent.interrupt_compat.request_hard_interrupt() helper, which handles both the new hard_interrupt ABI and the legacy interrupt fallback. --- agent/background_review.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/agent/background_review.py b/agent/background_review.py index 42979f3bd0..f48a3d5200 100644 --- a/agent/background_review.py +++ b/agent/background_review.py @@ -123,7 +123,9 @@ def _interrupt_background_review(review_agent: Any) -> None: def _interrupt() -> None: try: - review_agent.interrupt("superseded by a new live turn") + from agent.interrupt_compat import request_hard_interrupt + + request_hard_interrupt(review_agent, "superseded by a new live turn") except Exception: logger.debug( "Failed to cancel in-flight background review for a new turn",