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: re-raise control-flow exceptions (InterruptedError, CancelledError)
Tonyfd7eeeb15f5b
diff --git a/browser_use/agent/service.py b/browser_use/agent/service.pyindex 09ada94dc..e07276d96 100644--- a/browser_use/agent/service.py+++ b/browser_use/agent/service.py@@ -2808,6 +2808,9 @@ class Agent(Generic[Context, AgentStructuredOutput]):breakexcept Exception as e:+ # Re-raise control-flow exceptions to preserve stop/pause/interrupt behavior+ if isinstance(e, (InterruptedError, asyncio.CancelledError)):+ raise# Handle any exceptions during action executionself.logger.error(f'❌ Executing action {i + 1} failed -> {type(e).__name__}: {e}')await self._demo_mode_log(