# Regression suites

Collect failures as reusable regression cases, promote them from runs, and use suites as release-gate workloads with agentclash regression-suite.

Source: https://www.agentclash.dev/docs/guides/regression-suites
Markdown export: https://www.agentclash.dev/md/docs/guides/regression-suites

A regression suite is a workspace-level collection of cases that each represent a failure you do not want to see again. Cases can come from a failed run, from a production incident, or from a pinned dataset. Release gates and CI manifests then reference the suite as a workload.

Use a suite when a failure taught you something and you want future agent revisions to be checked against it.

## Where cases come from

- **A failed run.** `agentclash run promote-failure` turns one failing challenge from a run into a case in a suite.
- **A production incident.** `agentclash regression-suite case capture-production` records a failure observed outside AgentClash as a proposed case.
- **A dataset.** `agentclash dataset sync-regression-suite` copies the provenance of pinned dataset examples into a suite. See [Datasets overview](https://www.agentclash.dev/md/docs/guides/datasets-overview).

## Create a suite

```bash
agentclash regression-suite create \
  --name "Support agent regressions" \
  --description "Failures found in refund and escalation flows" \
  --default-gate-severity blocking

agentclash regression-suite list
agentclash regression-suite get <suiteId>
```

`--default-gate-severity` accepts `info`, `warning`, or `blocking`. `--source-challenge-pack-id` ties the suite to a source challenge pack. For anything the flags do not cover, pass a JSON payload with `--from-file`.

## Promote a failure from a run

Find the failing run and challenge identity, then promote it into a suite:

```bash
agentclash run promote-failure <runId> <challengeIdentityId> \
  --suite <suiteId> \
  --title "Refund issued without order lookup" \
  --failure-summary "Agent refunded before verifying the order" \
  --severity blocking \
  --promotion-mode full_executable
```

`--promotion-mode` is `full_executable` or `output_only`. Use `--run-agent <id>` when the run has several agents and you need to name the one that failed.

## Capture a production failure

For incidents that never ran in AgentClash, record them as proposed cases:

```bash
agentclash regression-suite case capture-production <suiteId> \
  --title "Duplicate refund in production" \
  --failure-summary "Customer was refunded twice" \
  --severity warning \
  --promotion-mode manual \
  --incident-id INC-1042 \
  --external-url https://example.com/incidents/1042
```

Here `--promotion-mode` also accepts `manual`. The command describes the result as a proposed case, so review it before relying on it in a gate.

## Review and manage cases

```bash
agentclash regression-suite cases <suiteId>

agentclash regression-suite case update <caseId> --status active
agentclash regression-suite case update <caseId> --severity warning
```

Case status is one of `proposed`, `active`, `muted`, `archived`, or `rejected`. Archive a whole suite with `agentclash regression-suite update <suiteId> --status archived`; `active` restores it.

## Use suites as release gates

A CI manifest can list regression suites or individual cases in its `evaluation` block, and `ci validate --remote` checks that they are visible in the selected workspace. See [CI/CD agent gates](https://www.agentclash.dev/md/docs/guides/ci-cd-agent-gates) for the manifest and [Dataset CI gates](https://www.agentclash.dev/md/docs/guides/dataset-ci-gates) for gating on dataset baselines.

> Info: Run any of these commands with `--json` for machine-readable output, and set `AGENTCLASH_WORKSPACE` or pass `--workspace` so the CLI targets the right workspace.

## See also

- [CI/CD agent gates](https://www.agentclash.dev/md/docs/guides/ci-cd-agent-gates) - reference suites from a release gate
- [Datasets overview](https://www.agentclash.dev/md/docs/guides/datasets-overview) - sync dataset examples into a suite
- [Interpret results](https://www.agentclash.dev/md/docs/guides/interpret-results) - find the failing challenge to promote
- [CLI reference](https://www.agentclash.dev/md/docs/reference/cli) - every flag for `regression-suite`