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 <noreply@anthropic.com>
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user