cd /news/ai-agents/the-closed-agentic-qa-loop-cypress-a… · home › topics › ai-agents › article
[ARTICLE · art-176706] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

The Closed Agentic QA Loop: Cypress Agents That Run, Read the Evidence, and Fix

AppliedAI's QA team built a closed agentic QA loop on top of its Cypress framework for testing Opus, an AI workflow platform, in which a Team Lead agent delegates nightly triage, test planning, generation, execution, auditing, healing and bug analysis to nine specialized agents while a human QA engineer approves test cases and every pull request. The team reports that requiring agents to run tests and attach evidence, rather than infer failures from stack traces, cut ambiguity in triage, and it relies on Cypress 16.4.0's new --headless flag for cypress open plus the cypress-tap and cy-cloud APIs to keep concurrent agent sessions isolated.

recommendation

When building QA agents, make each one prove failures with a real Cypress run and Test Replay, and isolate concurrent sessions by unsetting ELECTRON_RUN_AS_NODE and using cypress open --headless.

more in playbook: Designing agent systems
by read4 min views3 publishedNov 26, 2026

Most AI testing tools stop at writing tests. Ours have to run them.

At AppliedAI, our QA team tests Opus, an AI workflow platform. Over the last few months we turned our Cypress framework into a closed agentic QA loop: a team of AI agents takes a nightly failure, a new feature or an explored bug all the way to a verified fix. A human stays in the loop and makes the decisions.

This post covers what the loop looks like, which Cypress features it uses, and the main lesson: an agent that runs the test does not have to guess.

One agent sits in the centre: the Team Lead. It starts every run and delegates the work to specialised agents. Each agent has one job:

# Agent / stage What it does
01 Nightly Results Pulls last night's run from Cypress Cloud, including Test Replay
02 Product Explorer Explores the live app as a brand-new user, looking for bugs nobody wrote a test for
03 Test Planner Designs manual test cases for a new feature and stores them in Qase
04 Test Generator Turns approved cases into UI and API Cypress specs
05 Test Executor Runs the specs headless and diagnoses failures
06 Test Auditor Checks specs against our conventions and coverage, read-only
07 Test Healer Fixes broken tests (stale selectors, changed flows) and opens a PR
08 Bug Analyzer Triages every failure with a confidence score, files Jira tickets, routes work to the healers
09 App Healer Takes confirmed application bugs and proposes the fix

The loop closes on itself. A fix shipped by a healer is checked again by the next nightly run, and that run is stage 01 again.

The human in the loop. A QA engineer talks only to the Team Lead. They scope each run, approve the test cases before any code is written, and approve every PR. Agents do the repetitive work: triage, healing and re-runs. People keep the judgement calls.

The biggest change was not writing tests faster. It was making agents prove what they say.

An agent that reads a stack trace and the spec source will produce a plausible explanation, and plausible explanations are often wrong. So every claim in our loop needs a run behind it:

The result is less ambiguity. When an agent reports "app bug, 90 % confidence", you can open the replay and see why.

None of this needs exotic tooling. It is mostly what Cypress ships today:

cy-cloud). The Bug Analyzer uses it to list runs, failed tests, errors and screenshots, which is the raw material for triage. Until now, when an agent drove Cypress through cypress-tap on your machine, the Cypress window and a browser opened on your screen and could pull focus from your editor. Cypress 16.4.0 adds a --headless flag to cypress open:

cypress open --e2e --headless --browser chrome

The agent gets a live session it can inspect with tap, and nothing appears on the screen. 16.4.0 also makes cypress tap status report when the config stops or a spec won't compile, so the agent reads the actual error instead of guessing why the session hangs. That fits "run, don't guess" well.

A few things to know: a person can't watch a headless session, it runs until the process is stopped, and after fixing a config error the agent has to restart Cypress. Docs: cypress open --headless.

Several agents running Cypress at the same time sounds like a recipe for flaky chaos. It works for us because each run is isolated from the others:

ELECTRON_RUN_AS_NODE=1 from their parent process, and that breaks Cypress, which is itself an Electron app. Every Cypress command we run starts with env -u ELECTRON_RUN_AS_NODE. It's a small detail that took a long time to find. With cypress open --headless, the last visible part (a browser window per live session) goes away too.

One caveat: isolation doesn't help against a rate-limited backend. When parallel runs hit a downstream service that throttles, the agents run those specs one after another. Knowing when not to parallelise is part of the guidelines.

The agents are only as good as the rules they follow. What makes the loop work is the boring part:

cy.wait() sleeps are banned. If an agent breaks a rule, a linter fails, not a reviewer's patience. With that in place, agents do more than turn tickets into test cases. They test the new feature: they explore it as a real user, refute their own findings with a second agent before filing, and only file what they can reproduce.

For us, the role of the QA automation engineer moved from writing and fixing specs to designing the system that writes and fixes them, and to owning the decisions at the gates.

Next posts in this series will go deeper on individual parts: the Product Explorer, LLM assertions with cypress-verify-llm, and how the healers decide between a test bug and an app bug.

How are you using agents with Cypress? I'd like to compare notes in the comments.

── more in #ai-agents 4 stories · sorted by recency
── more on @appliedai 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/the-closed-agentic-q…] indexed:0 read:4min 2026-11-26 · —