From 1232490c3ba89854b1049d80020c8fa234cfc786 Mon Sep 17 00:00:00 2001 From: Jordan Ramos Date: Wed, 4 Mar 2026 18:01:02 -0700 Subject: [PATCH] Increase main agent timeout to 30 minutes for long delegate tasks Changed from 600s (10 min) to 1800s (30 min) to prevent main agent from timing out before delegate tasks can complete. Timeout hierarchy: - SubAgent idle timeout: 300s (5 min) - no progress - SubAgent total timeout: 900s (15 min) - hard cap - Delegate task timeout: 900s (15 min) - thread timeout - Main agent timeout: 1800s (30 min) - allows long operations This ensures main agent waits long enough for: - Single delegate tasks up to 15 min - Multiple sequential delegate tasks - Complex tasks with retries Co-Authored-By: Claude Sonnet 4.5 --- llm_interface.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llm_interface.py b/llm_interface.py index 7cfe3a4..79dc568 100644 --- a/llm_interface.py +++ b/llm_interface.py @@ -252,7 +252,7 @@ class LLMInterface: # Block with 10-minute timeout to prevent hangs # Complex tasks (repo analysis, multi-step operations) can take 5-8 minutes logger.info("[LLM] Waiting for Agent SDK response (timeout: 600s)...") - result = future.result(timeout=600) + result = future.result(timeout=1800) # 30 min to allow long delegate tasks logger.info("[LLM] Agent SDK response received successfully") return result except TimeoutError: @@ -263,7 +263,7 @@ class LLMInterface: msg_count = getattr(self, '_last_message_count', 0) tools_used = getattr(self, '_last_tool_names', []) - error_parts = [f"Task timed out after 10 minutes ({msg_count} messages processed)"] + error_parts = [f"Task timed out after 30 minutes ({msg_count} messages processed)"] if tools_used: unique = list(dict.fromkeys(tools_used))