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: Execute initial actions when rerun history
Sean Guc2b1b98d2082
diff --git a/.gitignore b/.gitignoreindex d5baf384c..907bdff07 100644--- a/.gitignore+++ b/.gitignore@@ -180,3 +180,4 @@ AgentHistoryList.jsongcp-login.json.vscode.ruff_cache+.ideadiff --git a/browser_use/agent/service.py b/browser_use/agent/service.pyindex 94d9e6325..a29739f0b 100644--- a/browser_use/agent/service.py+++ b/browser_use/agent/service.py@@ -592,6 +592,10 @@ class Agent:Returns:List of action results"""+ # Execute initial actions if provided+ if self.initial_actions:+ await self.controller.multi_act(self.initial_actions, self.browser_context, check_for_new_elements=False)+results = []for i, history_item in enumerate(history.history):