Back to Research

Playwright MCP: faster agent loops with receipts

A Playwright MCP workflow note for faster agent loops, focused on connector ownership, scoped access, review logs, and test evidence.

Crossing the Bridge, landscape painting by Jules Dupré (1838).
Rogier MullerMarch 9, 20266 min read

Playwright MCP makes your agent loop faster, but the speed only pays off if anyone can still quote a file when the merge needs defending. Playwright MCP is a Model Context Protocol server that lets a coding agent drive a real browser, so UI checks happen inside the loop instead of waiting on a human to click around. The agent runs a check, reads the result, and reacts on its own. That is great for velocity and risky for review, because the person who used to watch the browser is now out of the loop. The fix is simple to say and easy to skip: write the evidence down where reviewers can find it.

This piece is about the four small artifacts that keep a browser-driving agent honest. None of them are clever. All of them are paste-able.

Why a faster loop can hurt review

A faster check loop does not make work more trustworthy. It makes whatever you already trust arrive sooner, including the gaps.

We learned this the slow way. We thought tighter prompts could stand in for repo contracts, and it held up until crunch weeks, when summaries shrank to bullet points and the reviewable story disappeared before the model ever got worse. The loop was green. Nobody could say why.

That is the trap. Once a green loop becomes the thing you optimize, it stops measuring what review actually needs. Parallel agents will happily make the metric go up while the narrative quietly dies. So the rule we settled on: make the trail easy to read before you make generation easy to run.

The four receipts

Each receipt answers one question a reviewer would otherwise have to ask in person.

The replay sandwich fixes merged greens nobody could replay. We had Codex runs land where reviewers never saw the transcript, which is verification theater: the commands ran, but the story did not survive the terminal. So AGENTS.md now requires three things before a PR opens, an intent line, the command transcript, and a diff summary, layered on top of the standard Codex quickstart workflow. Now review is reproducible without standing behind someone's screen.

The connector card fixes blast radius. Wire up a connector fast and it tends to touch data nobody put on the diagram. A server that drives a browser deserves the most explicit trust boundary in the room, and the MCP specification gives you the vocabulary for it. One markdown card does the job: allowed actions, forbidden actions, owner, rollback. People learn what "off" looks like before an incident teaches them.

The child receipt block fixes the telephone game inside a delegation stack. When agents hand work to other agents, the parent summary tends to drop the paths the child actually touched. So every child returns its paths, its commands, and the tests that prove the regression guards held. Parents stop green-lighting mystery diffs just because the browser loop said everything passed.

The decision stub fixes the "why this approach?" question that survives a green CI. The PR template forces three lines: constraints considered, alternatives rejected, and the verification proof. The debate moves from taste to written tradeoffs.

Here is the delegation-boundary snapshot we keep next to the agent config. Adapt the globs to your repo.

---
description: Delegation boundary snapshot (adapt globs to your repo)
globs:
  - "**/*"
alwaysApply: false
---

- Cursor: keep scopes explicit in `.mdc`; forbid undeclared MCP domains.
- Claude Code: cite `CLAUDE.md` precedence before expanding bash scope.
- Codex: ensure `AGENTS.md` carries replay-friendly verification notes for CLI runs.

In our methodology this lives in Document, before Review, because the handoff has to survive without the original operator in the room. For session setup, Cursor's agent docs and Claude Code getting started cover the tooling half.

The merge gate

When a browser-driving PR shows up, four questions decide whether it merges. If the PR body cannot answer them, it goes back.

Gate Question
Replay proof Which commands prove the regression guards?
Receipt match Does the PR body list scopes plus the verification transcript?
Rules precedence Which .mdc, SKILL.md, or CLAUDE.md governed behavior?
Connector truth Which MCP servers fired, and were they expected?

Run this checklist before you approve:

  • Primary-doc links were smoke-checked after publishing edits.
  • MCP connectors mentioned (if any) list owners.
  • Verification command output is pasted or linked.
  • Forked agent work lists parent plus child responsibilities.

Some calls stay with humans no matter how green the loop is: threat models, customer promises, and blast-radius decisions do not go on autopilot.

Common questions

  • What does Playwright MCP change about agent verification?

    It moves browser checks inside the agent loop, so the agent runs a UI check and reacts without a human driving the browser. That removes the person from the middle of the loop, which is exactly why the receipts, transcripts, connector cards, and decision stubs have to move into the repo. The evidence has to outlive the moment the check ran.

  • Does a faster check loop reduce review work?

    Only when the loop produces evidence reviewers can replay. A fast loop that ships summaries gives you more merges per day with the same fuzzy trail, which is more archaeology, not less. The replay sandwich keeps each iteration quotable with an intent line, the command transcript, and a diff summary so review stays reproducible.

  • What belongs on a connector card for a browser-driving MCP server?

    Allowed actions, forbidden actions, an owner, and a rollback path. A server that drives a browser can reach much further than a diagram suggests, so the card is where its blast radius gets written down and reviewed in advance. Without it, the first incident becomes the documentation, which is the worst time to learn the boundary.

Where to go next

A faster loop multiplies whatever it loops over: loop over receipts and you compound trust, loop over guesses and you just reach the incident sooner. Pick one receipt, the connector card is the easiest win, and standardize it on your next browser-driving PR; if you want a second pair of eyes, our AI coding governance work walks one sprint of diffs with you.

Further reading

Related training topics

Related research

Ready to start?

Transform how your team builds software.

Book a 15-minute sync