@@ -243,7 +243,7 @@ async def run_task(
243243 break
244244
245245 if not agent_action and not task_completed :
246- self .logger .warning (
246+ self .logger .info (
247247 "Model did not request an action and task not marked complete. Ending task to prevent loop." ,
248248 category = StagehandFunctionName .AGENT ,
249249 )
@@ -290,7 +290,7 @@ def _process_provider_response(
290290 block .model_dump () for block in response .content
291291 ]
292292 except Exception as e :
293- self .logger .warning (
293+ self .logger .error (
294294 f"Could not model_dump response.content blocks: { e } " ,
295295 category = StagehandFunctionName .AGENT ,
296296 )
@@ -337,7 +337,7 @@ def _convert_tool_use_to_agent_action(
337337 and tool_name != "goto"
338338 and tool_name != "navigate_back"
339339 ):
340- self .logger .warning (
340+ self .logger .error (
341341 f"Unsupported tool name from Anthropic: { tool_name } " ,
342342 category = StagehandFunctionName .AGENT ,
343343 )
@@ -501,7 +501,7 @@ def _convert_tool_use_to_agent_action(
501501 )
502502 action_type_str = "drag" # Normalize
503503 else :
504- self .logger .warning (
504+ self .logger .error (
505505 "Drag action missing valid start or end coordinates." ,
506506 category = StagehandFunctionName .AGENT ,
507507 )
@@ -559,7 +559,7 @@ def _convert_tool_use_to_agent_action(
559559 )
560560 action_type_str = "function"
561561 else :
562- self .logger .warning (
562+ self .logger .error (
563563 "Goto action from Anthropic missing URL" ,
564564 category = StagehandFunctionName .AGENT ,
565565 )
@@ -572,7 +572,7 @@ def _convert_tool_use_to_agent_action(
572572 )
573573 action_type_str = "function"
574574 else :
575- self .logger .warning (
575+ self .logger .error (
576576 f"Unsupported action type '{ action_type_str } ' from Anthropic computer tool." ,
577577 category = StagehandFunctionName .AGENT ,
578578 )
@@ -613,7 +613,7 @@ def _format_action_feedback(
613613 self .format_screenshot (new_screenshot_base64 )
614614 )
615615 else :
616- self .logger .warning (
616+ self .logger .error (
617617 "Missing screenshot for computer tool feedback (empty string passed)." ,
618618 category = StagehandFunctionName .AGENT ,
619619 )
0 commit comments