diff --git a/tests/tools/test_interrupt.py b/tests/tools/test_interrupt.py index aca47df9e19bb..5552ea496b181 100644 --- a/tests/tools/test_interrupt.py +++ b/tests/tools/test_interrupt.py @@ -122,6 +122,11 @@ class TestPreToolCheck: agent._interrupt_requested = True agent.log_prefix = "" agent._persist_session = MagicMock() + # PR #72425: execute_tool_calls_* read _incremental_persistence_failed + # via getattr at loop top. A bare MagicMock auto-creates a truthy value + # for any attribute access, which would short-circuit the interrupt + # skip path before any cancelled-tool messages are appended. + agent._incremental_persistence_failed = False # Import and call the method import types