The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(agent): drop the diagnostic message from the batch-guard interrupt
kshitijk4poorc77fc2c06fe4
diff --git a/agent/tool_executor.py b/agent/tool_executor.pyindex c572b8d1c74..18ec3e8ae4c 100644--- a/agent/tool_executor.py+++ b/agent/tool_executor.py@@ -975,12 +975,9 @@ def _run_sequential_tool_execution_middleware(# A timed-out shell may still be unwinding. Never release a later# prepared command into overlapping execution.prepared.batch.close()- # Label the abort as the batch guard's own, not a user stop: without an explicit- # ``tool_reason`` the soft path books this as "user sent a new message" (#130207).- agent.interrupt(- "terminal batch tool did not complete",- tool_reason="terminal batch aborted: call timed out",- )+ # Label the abort as the batch guard's own, not a user stop (#130207). No message:+ # ``_interrupt_message`` is what gateway/CLI re-queue as the user's next turn.+ agent.interrupt(tool_reason="terminal batch timeout")future.cancel()if state == "timeout":_interrupt_worker_tids(agent, worker_tid)diff --git a/tests/agent/test_interrupt_issuer_attribution.py b/tests/agent/test_interrupt_issuer_attribution.pyindex 3ccde808bea..0702aad6898 100644--- a/tests/agent/test_interrupt_issuer_attribution.py+++ b/tests/agent/test_interrupt_issuer_attribution.py@@ -104,9 +104,11 @@ def test_soft_interrupt_with_tool_reason_is_attributed_to_the_system():was booked as a human stop and rendered as the user-stop placeholder (#130207)."""agent = _bare_agent()try:- agent.interrupt("terminal batch tool did not complete", tool_reason="terminal batch aborted")+ agent.interrupt(tool_reason="terminal batch timeout")assert agent._interrupt_requested is True- assert interrupt_issuer(agent) == "terminal_batch_aborted"+ assert interrupt_issuer(agent) == "terminal_batch_timeout"+ # No message: gateway/CLI re-queue ``_interrupt_message`` as the user's next turn.+ assert agent._interrupt_message is Nonefinally:set_interrupt(False)