> ## Documentation Index
> Fetch the complete documentation index at: https://cli-docs.relai.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# regression select

> Select focused regression checks after a direct change.

`relai regression select` examines a proposed change and recommends a small set
of existing RELAI tests, custom adapter tasks, or individual benchmark samples.
It does not run them or change code.

```sh theme={"system"}
relai regression select --base HEAD --change "Fix retry handling" --max-targets 3
relai regression select --agent-target support-agent --result-json .relai/runs/regression-selection.json
relai regression select --agent-interaction
```

`--base` defaults to `HEAD`. The selector reads the working tree diff and Git
status relative to that revision; use `--change` to supply intent, especially
when the change is only proposed or lives in an untracked file. Use
`--agent-target` in a multi-target project; it is required when multiple
targets are registered. `--max-targets` defaults to 3. The selector can read
the current project source and EvalsWiki context when available. Tests
without a declared agent target remain eligible for a named target; tests
declared for another target are excluded. A missing Wiki is reported as
`unavailable` and does not prevent selection.
For large benchmarks, RELAI considers at most ten rows per benchmark and
reports that limit as a coverage gap.

`--result-json` writes a versioned result with selected checks, reasons for
each choice, suggested simulation commands, and any coverage gaps. An empty
selection is valid when RELAI explains why no existing check is useful. A
coverage gap means the current test catalog may miss an affected behavior; it
is not a passing result.
With `--agent-interaction`, stdout carries one
`relai.agent_interaction.v2` completion document pointing to the saved result.
RELAI writes that result automatically when
`--result-json` is omitted. The command never asks for approval or runs tests.
Selection keeps no session: Ctrl-C cancels it (exit status `130`, with a
`cancelled` document under `--agent-interaction`), and when the
[invocation timeout](https://cli-docs.relai.ai/cli/overview.md) is reached it exits with status `124`;
re-run the command to select again.

Run the suggested `relai simulate` command for each selected check. For a behavior
change, run the most relevant case before and after the fix when feasible;
after a direct fix, run the selected cases against the changed code. Inspect
simulation scores and trajectories before claiming the change is safe. If no
existing case measures the risk, consider adding grounded coverage. For a
change that needs repeated candidate generation and evaluation, use
[`relai optimize`](https://cli-docs.relai.ai/cli/optimize).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.