Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
Python ai-agentsai-toolsbrowser-agentbrowser-automationbrowser-usecdpcloud-browsercomputer-useheadless-browserllmmcpplaywrightpythonremote-browserstealth-browserweb-automationweb-scraping
fix(cli): run blocking poll in thread to avoid blocking event loop
ShawnPanaaf1ac137c051
diff --git a/browser_use/skill_cli/commands/agent.py b/browser_use/skill_cli/commands/agent.pyindex 310318930..e5bd72c3a 100644--- a/browser_use/skill_cli/commands/agent.py+++ b/browser_use/skill_cli/commands/agent.py@@ -1,5 +1,6 @@"""Agent task command handler."""+import asyncioimport loggingimport osfrom typing import Any@@ -151,9 +152,11 @@ async def _handle_cloud_task(params: dict[str, Any]) -> Any:'message': 'Task started. Use "browser-use task status <task_id>" to check progress.',}- # Poll until complete+ # Poll until complete (run in thread to avoid blocking event loop)logger.info('Waiting for task completion...')- result = cloud_task.poll_until_complete(task_id, stream=params.get('stream', False))+ result = await asyncio.to_thread(+ cloud_task.poll_until_complete, task_id, stream=params.get('stream', False)+ )return {'success': True,