Skip to content

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

Add impossible task and captcha detection logging

Cursor Agent714232bddd93
diff --git a/browser_use/agent/service.py b/browser_use/agent/service.py
index e3a90fce7..c572c6caa 100644
--- a/browser_use/agent/service.py
+++ b/browser_use/agent/service.py
@@ -974,8 +974,11 @@ class Agent(Generic[Context, AgentStructuredOutput]):
judge_log += f'⚖️ {verdict_color}Judge Verdict: {verdict_text}\033[0m\n'
if judgement.failure_reason:
judge_log += f' Failure: {judgement.failure_reason}\n'
+ if judgement.impossible_task:
+ judge_log += ' 🚫 Impossible Task: Task was fundamentally impossible to complete\n'
if judgement.reached_captcha:
judge_log += ' 🤖 Captcha Detected: Agent encountered captcha challenges\n'
+ judge_log += ' 👉 🥷 Use Browser Use Cloud for the most stealth browser infra: https://docs.browser-use.com/customize/browser/remote\n'
judge_log += f' {judgement.reasoning}\n'
self.logger.info(judge_log)