An agent that checks whether a page is ready can be the reason the page never becomes ready. On Cloudflare's full-page check, our own status probe was enough to make a valid click fail, every time. This post covers what we measured on production on 12 November 2026 and how the runner works now. It is not a way around Cloudflare: the check is built to let a real browser through after one click, and the lesson is how not to break that.
The setup
Browsa runs agent tasks in Phantom, Browsa's own browser. Without a proxy, a browser exits from our data-center address, and on many Cloudflare sites that address alone brings up the "Verify you are human" page. The runner's job on that page is short: notice the check, click the checkbox once, and notice when the real page has loaded.
With the Phantom build shipped that day, one click on the checkbox passed. With the previous build, the same click from the same address was refused. The address decides whether the check appears; the browser decides whether the click is accepted.
What broke it
To notice the check and its end, the runner asked the page about its state every 0.5 s through CDP's Runtime.evaluate. We tried two versions of that question on the same page, same browser, same click:
| Probe, every 0.5 s | After one click |
|---|---|
document.querySelector(...) and document.title | Never cleared |
typeof window._cf_chl_opt only | Cleared in 1 s |
The first probe only read. It changed nothing on the page, yet the check never accepted the click while it ran. We do not know which signal Cloudflare reads here, and Cloudflare does not document it. We only know the outcome, and that it repeated.
The variable that outlives the check
The light probe has a catch. window._cf_chl_opt is defined on the check page, but it stays defined after the check passes, because the real page is swapped in without a full navigation. A probe that trusts it alone will report a check that is already gone.
The fix is to ask the browser, not the page. CDP's Target.getTargets returns every tab's URL and title from the browser process, without running anything inside the page. The check page has a recognizable title, so the runner treats a yes from the variable as true only while the tab title still matches:
import re
# Cloudflare translates the title; add the languages your browsers use.
CHECK_TITLE = re.compile(r"^\s*(just a moment|attention required|nur einen moment)", re.I)
async def check_page_is_up(browser, url):
"""Read tab titles from the browser. Nothing runs inside the page."""
cdp = await browser.new_browser_cdp_session() # Playwright, async API
infos = (await cdp.send("Target.getTargets"))["targetInfos"]
base = url.split("#")[0]
titles = [t["title"] for t in infos
if t["type"] == "page" and t["url"].split("#")[0] == base and t["title"].strip()]
if not titles:
return None # still loading: no answer yet
return any(CHECK_TITLE.match(t) for t in titles)An empty title mid-load proves nothing, so it returns no answer rather than "passed". We have seen the German title, "Nur einen Moment...", on browsers set to a German locale.
When to click
Timing mattered too. On a busy browser, a click sent about 7 s after the check page appeared did nothing: the widget was still starting. Later clicks worked, and every accepted click cleared the page within 2 s.
- 0 sCheck page appears
- about 7 sA click here can be ignored
- 9 sThe runner clicks once
- within 2 sReal page loads
So the runner now waits 9 s before the first click, gives each click 12 s to clear, and stops after 3 clicks. On /captcha, Cloudflare's full-page check passed 5 of 5 times from the data-center address, with a median of 13.5 s.
Lessons for agent builders
- Keep your code out of the challenge page. Anything that queries the DOM on a timer is suspect while a check may be up: readiness checks, element indexers, page scripts that build an accessibility snapshot. We measured only our own probe, so test yours.
- Read state from the browser. Tab titles and URLs from
Target.getTargetscost nothing on the page side. - Don't trust one signal. A page variable can outlive the page it describes. Confirm it with a second source.
- Click once, then wait. Give the widget time to start, and give a click time to work before you send another.
Browsa's hosted tasks do all of this already. If you drive your own Playwright or Puppeteer code on a Browsa browser, the same rules apply to your code.
Sources
- Target.getTargets, Chrome DevTools Protocol
- Browser.new_browser_cdp_session, Playwright for Python
- Cloudflare challenges, Cloudflare docs
- Browsa captcha results: the full-page check row