fix(tool-executor): set tool_name on sequential per-iteration interrupt skip messages - #29100
Conversation
…pt skip messages execute_tool_calls_sequential checked _interrupt_requested at the top of each loop iteration and built skip messages manually — without tool_name. The sibling concurrent path and the end-of-loop sequential path were both already converted to make_tool_result_message by NousResearch#28914, but this per- iteration block was missed. Result: interrupted sequential tool calls produced blank tool_name entries in the session DB, breaking the invariant introduced by NousResearch#28914. Fix: replace the manual dict with make_tool_result_message, symmetric with every other interrupt skip path in the same file. Adds a regression test that asserts tool_name == name on all skip messages produced by the per-iteration interrupt check.
|
Thanks for the focused fix. I verified the premise against current main, and this still looks like a real gap. The top-of-loop sequential interrupt path in I do not see blockers in the implementation or the regression test. The change is narrow, fits the existing helper pattern introduced by #28914, and does not add new core surface or cache-sensitive behavior. This is an automated hermes-sweeper review. |
|
Thanks for the focused regression report and test coverage. This is an automated hermes-sweeper review. Current
Closing as implemented on main. |
Summary
execute_tool_calls_sequentialchecks_interrupt_requestedat the top of each loop iteration before starting the next tool. When triggered, it builds skip messages manually — withouttool_name. PR #28914 fixed every other interrupt path in the file to usemake_tool_result_message, but this per-iteration block was missed.Before (manual dict,
tool_nameabsent):After (symmetric with every other interrupt path):
Coverage of all interrupt skip paths in
tool_executor.pyafter this fix:execute_tool_calls_concurrentpre-flightexecute_tool_calls_sequentialend-of-loopexecute_tool_calls_sequentialper-iteration ←Test plan
TestPreToolCheck::test_sequential_per_iteration_interrupt_sets_tool_nameassertstool_name == nameon all skip messages produced by the per-iteration checktests/tools/test_interrupt.py— 7 passed)test_tool_name_db_persistence.pystill passes (1 passed)make_tool_result_messagewas already imported; no new imports needed{"role": "tool", ...}constructions intool_executor.py