From 888529f38133781d448c71e9205f15bb969e4b82 Mon Sep 17 00:00:00 2001 From: Alex Clarke Date: Fri, 31 Jul 2026 16:00:26 -0600 Subject: [PATCH] fix: infinite loop bug when attempting to interrupt a prompt exchange right before a session compression --- src/repl/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/repl/mod.rs b/src/repl/mod.rs index 0af89fa..e636947 100644 --- a/src/repl/mod.rs +++ b/src/repl/mod.rs @@ -1400,7 +1400,8 @@ async fn ask( .is_some_and(|s| s.needs_compression(app.compression_threshold)); if needs_compression { - let agent_can_continue_after_compress = should_continue(ctx); + let agent_can_continue_after_compress = + should_continue(ctx) && !abort_signal.aborted_ctrlc(); if let Some(session) = ctx.session.as_mut() { session.set_compressing(true);