From 02a10b2f8d124001c14974904e55748b67f10b25 Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Sat, 7 Mar 2026 16:49:54 -0500 Subject: [PATCH] Fix stall watchdog killing agent during long LLM reasoning turns Move emitter.touch() before the event filter in spawn_event_forwarder so streaming events (TextDelta, AssistantTextStart, etc.) also reset the watchdog timer. Previously these were filtered out, causing the 600s stall watchdog to fire during long generation turns with no tool calls. Co-Authored-By: Claude Opus 4.6 --- crates/arc-workflows/src/cli/backend.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/arc-workflows/src/cli/backend.rs b/crates/arc-workflows/src/cli/backend.rs index cf8fb483c..cde8eba43 100644 --- a/crates/arc-workflows/src/cli/backend.rs +++ b/crates/arc-workflows/src/cli/backend.rs @@ -43,6 +43,9 @@ fn spawn_event_forwarder( let mut rx = session.subscribe(); tokio::spawn(async move { while let Ok(event) = rx.recv().await { + // Reset watchdog on every event, including streaming deltas + emitter.touch(); + // Track file changes from tool calls match &event.event { AgentEvent::ToolCallStarted {