How a run works
What agent-qa does for each step, how it decides a verdict, and what happens after the run ends.
A test is a target and a list of plain-English steps. A run takes one or more tests, drives the app step by step, and ends with a verdict for every test and one for the whole run.
One step at a time
For each step, agent-qa repeats a short loop until the step is done:
Observe
It reads the current screen: the accessibility tree and page structure, plus a screenshot when the model can see images.
Recall
It reads the knowledge brief for this test: your policies, cautions about known failure modes, and facts learned on earlier runs.
Plan and act
The model picks the next action, such as a click, a typed value or a navigation, and agent-qa performs it on the real app.
Verify
It checks the result against what the step asked for. A step that says "Verify the total is $36.00" passes only when the screen proves it.
A step may take several actions. Each step is capped at 30 actions and 30 model calls by default (use.planner.maxActions and use.planner.maxPlanningTurns), and stops with the limit as its reason when it needs more.
Two things can skip the model:
- The action cache. When the same step meets the same screen, agent-qa replays the action that completed it last time. See Caching.
- Procedures. A flow that memidex has seen pass several times can replay without planning. See How knowledge reaches a run.
When an action fails or the check rejects its result, the failure goes back to the model, which plans a recovery. A test that passes after such a recovery is healed. See Self-healing.
Verdicts
Each test ends with one of these:
| Verdict | Meaning |
|---|---|
passed | Every step passed. |
healed | Every step passed, and at least one needed a planned recovery. Counts as a pass. |
failed | A step failed, or a setup hook failed. |
timeout | The test ran longer than use.timeout.test. |
cancelled | The run was stopped, for example with Ctrl+C. |
skipped | An earlier test in the same suite failed, so this one did not start. |
The run's verdict is failed if any test failed or timed out, cancelled if the run was stopped, healed if any test healed, and passed otherwise. A quarantined test's failure is reported but does not fail the run.
Exit codes
| Code | Meaning |
|---|---|
0 | The run passed or healed. |
1 | The run failed, or a test timed out. A missing test file, .env, hooks file or secrets file also exits 1. |
2 | agent-qa could not run the tests: an invalid config, a missing model credential, a pattern that matched nothing, or a refused run. |
130 | The run was cancelled. |
Suites and parallel runs
A suite runs its tests one after another on one browser or device. When one fails, the rest of that suite is skipped.
Tests named directly run one at a time by default. With use.parallel: true or --parallel, up to use.workers tests run at once (3 by default).
Every test in one run must belong to the same product. A target's product is its product field, or the target's own name. Tests on different products need separate agent-qa run invocations.
After the verdict
The verdict and the exit code are final the moment the run ends. agent-qa then spends up to 60 seconds on post-run work:
- Analysis. It classifies each failure, for example as an app bug, a test bug, a flaky failure or an environment problem.
- Curation. It turns what the run proved into knowledge records. See How knowledge is learned.
- Proposals. Extra checks on new knowledge, when an eval corpus exists.
A line on stderr reports each stage as pending, running, complete, failed or skipped. Work that does not finish in time stays queued, and the next local run finishes it. agent-qa run --detach skips the wait entirely. Daemon and background work has the details.
Where a run lives
Each run gets an ID such as r_ followed by ten words, and a folder under .agent-qa/runs/. Read runs through agent-qa rather than from the folder:
npx agent-qa runs list
npx agent-qa runs overview <runId>
npx agent-qa digest <runId>Review a run walks through the evidence, and the dashboard shows the same runs in a browser.
The model
One model entry, use.llm, plans and checks every step of a run. A test or suite can name a different entry in its own use.llm. The same model writes up analysis and knowledge after the run.
Models that accept images get a screenshot with each decision. Set vision: false on a model entry to run text-only: agent-qa then works from the accessibility tree and page structure, and cannot check purely visual details.