- Docker containers and a forward proxy keep Claude Code test environments identical across page variants.
- WebFetch requests Markdown mirrors ahead of standard HTML when evaluating page content.
- A secondary model processes scraped content under strict quotation limits before Claude answers.
- Running multiple iterations accounts for the non-deterministic responses of Claude Code.
In this guide
What is the Claude Code page testing workflow?
The Claude Code testing workflow allows engineering and marketing teams to observe how autonomous agents read and interpret web pages. Zapier created this framework, called Agent Arm Runner, to test website adjustments without waiting weeks for conventional search engine feedback loops.
Running this testing harness reveals whether changes to your live site, Markdown alternate versions, or intermediate model instructions alter what Claude Code reports to users.
- Primary model
- Opus 5
- WebFetch parsing model
- Haiku 4.5
- Isolation method
- Docker container
- Traffic routing
- Forward proxy
- Test setup file
- JSON configuration
- Preferred content header
- text/markdown
How to test web pages with Claude Code
Testing web pages with Claude Code requires running controlled experiments that isolate page content while keeping prompts and addresses identical. Zapier uses this step-by-step setup to evaluate how model responses change between experimental page variants.
- Package Claude Code inside a Docker container configured with a forward proxy to monitor and manage all outbound requests.
- Write a JSON configuration file specifying the prompt to execute, the experimental arms to test, and the required number of repetitions.
- Route the control arm directly to the production website path through the forward proxy.
- Configure the proxy to intercept requests for the test path on variant runs and redirect them to a preview deployment.
- Provide Claude Code with the exact same user prompt and production URL across every experimental arm.
- Start every test iteration inside a fresh Docker container to ensure session state does not carry over between runs.
- Repeat each experimental arm several times to account for the non-deterministic output of Claude Code.
How Claude Code retrieves and filters web content
Claude Code does not simply dump raw HTML into the primary conversation model when browsing the web. Zapier discovered that the internal WebFetch tool requests Markdown alternatives before HTML, using the header accept: text/markdown, text/html, */*.
Once WebFetch captures a page, Claude Code forwards the raw text to a secondary model rather than the primary reasoning engine. In tests where Opus 5 acted as the calling model, Zapier observed that Haiku 4.5 received the retrieved content with no external tools attached.
| Stage | Component | Function in workflow |
|---|---|---|
| Task execution | Opus 5 | Acts as the calling model that triggers tools and delivers answers |
| Page retrieval | WebFetch | Pulls web data, prioritizing text/markdown ahead of text/html |
| Content parsing | Haiku 4.5 | Summarizes fetched pages under strict length and quotation limits |
Tips and pitfalls when testing pages for Claude Code
Evaluating page visibility for Claude Code requires accounting for how background models alter content before answering queries. Overlooking alternate text formats or filtering instructions can lead to invalid conclusions during agent testing.
Insert a unique canary comment code into your test documents. If the canary code appears in the output of Claude Code, you can confirm exactly which page version the tool retrieved.
Editing HTML alone is insufficient if your domain serves Markdown mirrors. Claude Code prioritizes Markdown representations, so unedited Markdown files will bypass HTML changes completely.
Zapier found that the intermediate Haiku 4.5 request enforces strict rules on source text. These include a 125-character maximum for direct quotes, compulsory quotation marks for exact phrasing, and a complete prohibition on reproducing song lyrics.
Frequently asked questions
How does Claude Code fetch web page content?
Which model processes web pages inside Claude Code?
Why should tests on Claude Code run in clean Docker containers?
What quoting restrictions does Claude Code apply to web text?
How can teams test page variations in Claude Code without changing live URLs?
Sources: zapier.com
Want your brand to be the answer AI gives?
See how ready your website is for ChatGPT, Gemini and Perplexity, free, in about ten seconds.