Remove the browser_use logging monkey-patch once fixed upstream
We carry a workaround in
openhands-tools/openhands/tools/browser_use/logging_fix.py
because the browser_use server reconfigures logging for all loggers on
import — calling logging.basicConfig(), logging.disable() and
_ensure_all_loggers_use_stderr() during import/init — which clobbers the agent
server's own logging configuration. There is currently no opt-out env var, so we
monkey-patch logging around the import.
Upstream status
- Our patch, browser-use PR
#3717, was closed
without merge.
- As of
browser_use 0.13.3 the problematic behavior persists.
What to do here
Deadline
The warn_cleanup cleanup deadline was pushed from 1.35.0 to 2.0.0 in
#4071 (the 1.35.0 deadline was blocking the v1.35.0 release while the upstream
fix is still pending). The Verify deprecation removals CI check will fail again
once the project version reaches 2.0.0, so this should be resolved before then.
Remove the
browser_uselogging monkey-patch once fixed upstreamWe carry a workaround in
openhands-tools/openhands/tools/browser_use/logging_fix.pybecause the
browser_useserver reconfigures logging for all loggers onimport — calling
logging.basicConfig(),logging.disable()and_ensure_all_loggers_use_stderr()during import/init — which clobbers the agentserver's own logging configuration. There is currently no opt-out env var, so we
monkey-patch
loggingaround the import.Upstream status
#3717, was closed
without merge.
browser_use0.13.3 the problematic behavior persists.What to do here
browser_usefor a release that stops reconfiguring logging onimport (or adds an opt-out).
logging_fix.py, switch the call sites back to adirect
from browser_use.mcp import serverimport, and drop thewarn_cleanup(...)marker.Deadline
The
warn_cleanupcleanup deadline was pushed from1.35.0to2.0.0in#4071 (the
1.35.0deadline was blocking the v1.35.0 release while the upstreamfix is still pending). The
Verify deprecation removalsCI check will fail againonce the project version reaches
2.0.0, so this should be resolved before then.