Skip to content

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

Fix formatting in agent stopping method

Magnus Müller2ecd1d62848d
diff --git a/browser_use/agent/service.py b/browser_use/agent/service.py
index c5c867a87..ce4f60f89 100644
--- a/browser_use/agent/service.py
+++ b/browser_use/agent/service.py
@@ -1938,7 +1938,7 @@ class Agent(Generic[Context, AgentStructuredOutput]):
"""Stop the agent"""
self.logger.info('⏹️ Agent stopping')
self.state.stopped = True
-
+
# Signal pause event to unblock any waiting code so it can check the stopped state
self._external_pause_event.set()