core: close unified exec on tool interrupt

This commit is contained in:
Charles Cunningham
2026-02-20 00:14:17 -08:00
parent 3519b96a1e
commit c5f5d215d4

View File

@@ -5044,6 +5044,10 @@ pub(crate) async fn run_turn(
} = sampling_request_output;
if interrupted_tool_result {
cancellation_token.cancel();
// Keep interrupt cleanup consistent with abort_all_tasks(): a parallel
// unified-exec tool call may still be running when request_user_input
// returns an interrupted result.
sess.close_unified_exec_processes().await;
sess.finish_turn_without_completion_event(turn_context.as_ref())
.await;
// Defer TurnAborted emission until run_turn unwinds so the caller can