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(agent): Add max steps error to agent history #439
shyanilMishra9e142699690a
diff --git a/browser_use/agent/service.py b/browser_use/agent/service.pyindex f4cd25fd5..7e364bcf3 100644--- a/browser_use/agent/service.py+++ b/browser_use/agent/service.py@@ -566,7 +566,9 @@ class Agent(Generic[Context]):await self.register_done_callback(self.state.history)breakelse:- logger.info('❌ Failed to complete task in maximum steps')+ error_message = 'Failed to complete task in maximum steps'+ self.history.add_error(error_message)+ logger.info(f'❌ {error_message}')return self.state.historyfinally: