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.
This commit is contained in:
kshitijk4poor
2026-08-21 16:09:07 +05:30
committed by kshitij
parent 8bdf0e89e2
commit 80aef061fe
+3 -1
View File
@@ -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",