← All articles

The Cookie Banner That Silently Breaks Your Agent

TL;DR

Consent banners are the single most common cause of an agent clicking a button and nothing happening: the click lands on the overlay, not the control. Detect an overlay by checking what element is actually at the click coordinates, dismiss the banner first, and when a site's banner defeats the agent, have a person dismiss it once and record that as a procedure so every future run on that site starts by clearing it.

The agent clicked the right button. The banner was on top of it. Nothing about the model is wrong here; the page changed shape and the agent did not notice.

Why it is so common

Consent banners appear on the first visit, which for an agent with a fresh profile is every visit. They render late, after the page the agent already inspected. And they sit above everything, so a click aimed at the real button lands on the overlay and produces no navigation, no error, and no clue.

Detect it properly

Before clicking, ask the page what element is actually at those coordinates. If it is not the element you meant, something is covering it. This one check catches banners, modals, chat widgets and sticky headers alike.

const covered = await page.evaluate(([x, y]) => {
  const el = document.elementFromPoint(x, y);
  return el ? el.tagName + " " + (el.id || el.className) : "nothing";
}, [x, y]);
// If `covered` is not your target, dismiss whatever it is before clicking again.

Fix it once for the fleet

Banners vary by site and by region, and the dismiss button is never in the same place twice. Rather than hard-coding selectors that rot, let a person dismiss it once in a live session on the site that broke, and record that as a procedure. Every future run on that site starts by following it. Persisting the browser profile also stores the consent, so most sites never show the banner to that agent again.

Questions people ask

Why does my agent click a button and nothing happens?

Most often a consent banner or another overlay is on top of the button, so the click lands on the overlay. Check which element is at the click coordinates before clicking.

How do I make an agent dismiss cookie banners?

Check for an overlay at the target coordinates, dismiss it first, and persist the browser profile so consent is remembered. For a site whose banner defeats the agent, have a person dismiss it once and record the procedure.

Do cookie banners appear for agents more than for people?

Yes, because a fresh browser profile means every visit is a first visit. Persisting the profile removes most of them.

DoubleOh is the reliability layer for AI agents. When one gets stuck, a person fixes it once in a live browser, and the fix becomes a skill the whole fleet follows from then on.

Start free