We run cloud browsers for AI agents. Agents built with browser-use kept hitting walmart.com's "Robot or human?" page right after their first search, while the same browser, from the same kind of home connection, searched walmart from plain Playwright without trouble.
The cause was browser-use's own housekeeping between steps, the scripts it runs in the page to draw boxes around elements, and one argument turns them off.
How we tested
We replayed what a browser-use agent does on walmart, with browser-use's own action code and no LLM: open walmart.com, close a panel if one opens, type "Instant Pot" into the search box, press search, wait. Each try was a new session with a new US home connection. The three setups ran mixed together within the same hour, so the time of day can't explain the gap.
| browser-use 0.11.5 on walmart.com, 20 tries each | Search went through | "Robot or human?" after the search |
|---|---|---|
| As it ships | 0 | 15 |
With highlight_elements=False | 19 | 0 |
| As it ships, with our Browser API answering the scripts below | 19 | 0 |
The other tries didn't get as far as sending the search (5, 1 and 1), so they say nothing about the wall either way. Every try that did send it was walled as shipped, and none was in the other two.
What browser-use does between steps
By default browser-use takes a screenshot at each step, with coloured boxes drawn over the page's clickable elements so the model can refer to them by number. To draw and clear those boxes it runs scripts in the page itself, over the DevTools protocol. Before each new state it sends this, more or less:
const highlights = document.querySelectorAll('[data-browser-use-highlight]'); console.log('Removing', highlights.length, 'browser-use highlight elements'); highlights.forEach(el => el.remove()); It also draws a box where it clicks or types. So on every step the page sees elements appear and vanish and a console.log call run, all from a script, with no person behind any of it. We didn't work out which of these PerimeterX reacts to, only that without them it didn't show the wall.
The fix
from browser_use import Browser browser = Browser(cdp_url=..., highlight_elements=False) That works with any browser, local or in the cloud. The screenshots lose their coloured boxes; the model still gets the numbered list of elements, which is what it acts on.
Our Browser API answers the scripts itself
The flag is easy to miss, so our Browser API now answers browser-use's highlight scripts itself, without running them in the page. That's the third row above. If you want the boxes, say for a recording, connect with highlights=on.
Limits of the test
- It's one site and one anti-bot vendor. On other PerimeterX sites our runs improved too, but we didn't take them apart the same way.
- It's one version of browser-use, 0.11.5, and US home connections.
- Twenty tries per setup is enough to see a gap of 0 against 19. It isn't enough for small differences.
If your agent hits walls on other sites, try the flag and tell us what changed at support@serpbit.com. We told the browser-use team what we found.
