The circuit breaker and agent error handler were using a hardcoded 20s
timeout, but the worst-case auto-reconnect window is ~48s (3 attempts *
15s + 7s delays). Handlers would raise ConnectionError while reconnection
was still in progress. Now both use BrowserSession.RECONNECT_WAIT_TIMEOUT
(54s) derived from the actual reconnect parameters.
- Introduced type aliases for captcha results to improve clarity and maintainability.
- Updated event handler signatures to use specific event types from the CDP module.
- Ensured consistent typing for captcha result attributes within the CaptchaWaitResult class.
- Added assertion for timeout handling in the captcha waiting logic.
Move action_name extraction before the try block so it's always
defined when the except block references it. Previously, if
_check_stop_or_pause() raised InterruptedError before action_name
was assigned, the exception handler would fail with:
UnboundLocalError: cannot access local variable 'action_name'
where it is not associated with a value
Also reuse the action_data dict for the 'done' action check since
it's now available earlier in the loop.
Co-authored-by: Magnus Müller <MagMueller@users.noreply.github.com>
The done_output field has max_length=100000, but agent.history.final_result()
can return arbitrarily long strings (e.g., large data extractions). This caused
Pydantic validation errors when constructing UpdateAgentTaskEvent at the end of
agent.run(), crashing the entire run even though the task itself succeeded.
Truncate done_output to MAX_STRING_LENGTH before passing to the constructor.
Co-authored-by: Magnus Müller <MagMueller@users.noreply.github.com>
- Add max_clickable_elements_length parameter to Agent.__init__ with default 40000
- Add max_clickable_elements_length to AgentSettings
- Pass parameter through MessageManager to AgentMessagePrompt
- Bump version to 0.11.10a2
Co-authored-by: Magnus Müller <MagMueller@users.noreply.github.com>
Changes install.sh to clone from github.com/browser-use/browser-use@main
by default instead of installing from PyPI. Custom branches and repos
can still be specified via BROWSER_USE_BRANCH and BROWSER_USE_REPO
environment variables.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Previously only suggested --full, but --remote-only is a lighter-weight
option when users only need cloud browser support.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>