Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

added fallback incase of no task for judge

Saurav Panda6224e1975884
diff --git a/browser_use/agent/judge.py b/browser_use/agent/judge.py
index 2b7721717..52f9361c2 100644
--- a/browser_use/agent/judge.py
+++ b/browser_use/agent/judge.py
@@ -255,7 +255,7 @@ Respond with EXACTLY this JSON structure:
Be strict: if the response doesn't clearly satisfy every requirement, set verified to false."""
user_prompt = f"""<task>
-{task_truncated}
+{task_truncated or 'No task provided'}
</task>
<agent_final_response>