CAPTCHAs block AI shopping agents on product and cart pages
AI shopping agents stop at CAPTCHAs. Google's Gemini computer use model is instructed never to solve or bypass one, and OpenAI's Operator hands control back to the user. An agent-friendly store keeps visible CAPTCHA challenges off the homepage, product pages and cart, and protects only forms like login or contact.
Updated · By the Medusa team
- Category
- Access (25% of score)
- Impact
- High
- Scanner check
- No CAPTCHA on the homepage, product pages or cart
Why CAPTCHAs stop AI agents
A CAPTCHA is designed to stop automated clients, and AI agents are automated clients acting for a real shopper. Vendors have made the outcome explicit:
- Google’s Gemini computer use documentation says the model “MUST NEVER attempt to solve or bypass” a CAPTCHA.
- OpenAI’s Operator hands control back to the user when it reaches a CAPTCHA or a login.
So a challenge on a product page or in the cart ends the agent’s task at the exact moment it was about to add to cart, and the shopper has to take over manually.
This check covers on-page CAPTCHA widgets. Challenge pages served by a CDN or WAF before the page loads are covered by agent access.
What the scanner checks
The scanner loads three pages over plain HTTP: the homepage, one sampled product page, and the cart (/cart, keeping any locale prefix like /us, or the platform’s own cart path when the scanner detects a platform that uses a different one). In each page’s HTML it looks for:
- Script URLs for reCAPTCHA (
google.com/recaptcha/api.js,google.com/recaptcha/enterprise.js,recaptcha.net/recaptcha), hCaptcha (js.hcaptcha.com,hcaptcha.com/1/api.js) and Cloudflare Turnstile (challenges.cloudflare.com/turnstile). - Widget containers:
.g-recaptcha,.h-captcha,.cf-turnstile.
| Result | Condition |
|---|---|
| Pass | No CAPTCHA on any checked page, or only invisible reCAPTCHA (a script URL with render=<site key>, which is v3 score-only). |
| Fail | A visible CAPTCHA script or widget on any of the checked pages. |
| Inconclusive | None of the three pages could be loaded. |
There is no partial result: one challenge on the shopping path is enough to stop an agent. Pages the agent doesn’t need (login, contact) aren’t checked.
How to remove CAPTCHAs from the shopping path
-
Find where the script is loaded. Search your theme or layout for
recaptcha,hcaptchaandturnstile. A sitewide include in the header or footer, usually added for a newsletter or contact form, is the most common cause. -
Load it only on the form that needs it. Render the widget and its script on the login, signup, contact or gift-card page instead of in the global layout.
-
If you need scoring everywhere, use an invisible mode. reCAPTCHA v3 runs without a challenge:
<!-- Invisible, score-only: passes this check --> <script src="https://www.google.com/recaptcha/api.js?render=YOUR_SITE_KEY"></script> <!-- Visible v2 widget: fails this check on home, product or cart --> <script src="https://www.google.com/recaptcha/api.js" async defer></script> <div class="g-recaptcha" data-sitekey="YOUR_SITE_KEY"></div>The scanner treats any Turnstile or hCaptcha script on these pages as blocking, because it can’t tell from the HTML whether a challenge will be shown.
-
Move scraping protection to the edge. Use rate limits or bot management at the CDN, combined with verified-bot allowlists, instead of on-page challenges.
Verify by viewing the source of the homepage, a product page and /cart and confirming there are no recaptcha, hcaptcha or turnstile references.
How to fix it on Medusa
- No CAPTCHA by default. The Medusa DTC starter storefront ships without one. Keep it that way on product pages and the cart.
- Where the cart is checked:
/cart, or/{countryCode}/cartwhen the homepage redirects to a country path, as the starter’s middleware does. - If you add one: a CAPTCHA script in the root
layout.tsxloads on every route. Put it in the component for the form that needs it (login, contact) instead.
Common mistakes
- Adding a CAPTCHA to the add-to-cart or cart form to stop inventory bots. That blocks every agent, not just scalpers.
- Loading the CAPTCHA script sitewide because one footer newsletter form uses it.
- Assuming an “invisible” widget never shows a challenge. reCAPTCHA v2 invisible and similar modes can still escalate to a visible puzzle; only score-only modes never do.
Sources
Frequently asked questions
- Can AI agents solve CAPTCHAs?
- They are not supposed to. Google's Gemini computer use documentation says the model must never attempt to solve or bypass a CAPTCHA, and OpenAI's Operator returns control to the user when it meets one. Either way the agent's shopping task stalls.
- Does reCAPTCHA v3 hurt my agent-readiness score?
- No. reCAPTCHA v3 loaded with a site key in the render parameter is invisible and score-only, so the scanner reports it but still passes the check.
- Where is it fine to keep a CAPTCHA?
- On login, signup, contact, newsletter and gift-card forms. The scanner only inspects the homepage, one product page and the cart.
Run your store on a platform built for agentic commerce
Medusa is open-source, headless commerce with a full Store API agents can call and storefronts you control end to end.
Deploy on Medusa Cloud
Open-source commerce with a full Store API, hosted and scaled for you. Your storefront, your data model.
Storefront skills for coding agents
Teach Claude Code, Cursor or Codex to build storefronts with the patterns these checks look for.
npx skills add medusajs/medusa-agent-skills