diff --git a/pkg/agent/steering_test.go b/pkg/agent/steering_test.go index f8c046ea9..bb5d42c73 100644 --- a/pkg/agent/steering_test.go +++ b/pkg/agent/steering_test.go @@ -914,8 +914,10 @@ func TestAgentLoop_InterruptGraceful_UsesTerminalNoToolCall(t *testing.T) { foundHint := false foundSkipped := false + expectedHint := "Interrupt requested. Stop scheduling tools and provide a short final summary.\n\n" + + "Interrupt hint: wrap it up" for _, msg := range terminalMessages { - if msg.Role == "user" && msg.Content == "Interrupt requested. Stop scheduling tools and provide a short final summary.\n\nInterrupt hint: wrap it up" { + if msg.Role == "user" && msg.Content == expectedHint { foundHint = true } if msg.Role == "tool" && msg.ToolCallID == "call_2" && msg.Content == "Skipped due to graceful interrupt." { diff --git a/pkg/agent/turn.go b/pkg/agent/turn.go index c44a4f80e..358dae2b4 100644 --- a/pkg/agent/turn.go +++ b/pkg/agent/turn.go @@ -60,8 +60,7 @@ type turnState struct { startedAt time.Time finalContent string - pendingSteering []providers.Message - followUps []bus.InboundMessage + followUps []bus.InboundMessage gracefulInterrupt bool gracefulInterruptHint string