AI classification
Classification explains the evidence behind each category and the configured heal, warn, or fail action. Review the reasoning in the run viewer and override the category when the evidence supports a different diagnosis.
Classification identifies a test-authorship race and routes it to healing
ai.classification. Category actions and
project-specific guidance live in
Classification settings.
When classification puts a failure in an application bug category and your
workspace has Linear connected, the
run viewer’s Create Linear issue opens an issue draft whose description is a
prompt for your coding agent, with the run link, the classification reasoning,
and the error. It also includes the test link, branch, commit, root cause, and
steps before the failure when they’re available.
Classify during the run
In-flow classification runs the classification agent insidemomentic run when
a run exhausts its retries. The CLI includes a category, reasoning, and triage
action when the run exits, so CI needs no separate classification step. Prefer
this over invoking
momentic ai classify
afterwards.
Enable it
Turn it on inmomentic.config.yaml:
momentic.config.yaml
What happens on a failure
When a run fails after all retries, the CLI shows aClassifying failure step
and the agent inspects the failed step, screenshots, error details, past-run
evidence, and git context when available. The CLI writes the verdict into the
run’s results:
- The category, reasoning, confidence, and recoverability appear in CLI output and the run viewer.
- The configured action (
heal,warn, orfail) is attached to the run, somomentic ai triageandmomentic results checkcan use it without re-classifying. - With transient failure recovery enabled, a failure judged one-time recoverable can trigger an in-run recovery attempt guided by the classifier’s reasoning.
Let the verdict gate CI
By default the classifier records a category while every failed test still fails CI. SetoverrideExitCode: true so failures routed to heal or warn exit
0; failures routed to fail (for example BUG) still exit 1.
momentic.config.yaml
--classify-override-exit-code. Use
--no-classify to skip classification for that invocation.
In-flow vs momentic ai classify
momentic ai classify runs the same agent against finished runs. Prefer the
config-driven in-flow setup for CI:
- It needs no separate command or run selector; the verdict is part of the run
result when
momentic runexits. overrideExitCodeonly works in-flow, while the run is deciding its exit code.- In-flow saves the verdict automatically;
ai classifypersists only with--save.
ai classify to re-classify a past run, classify runs from an older CLI,
batch-classify a run group or commit, or ask follow-up questions with
--interactive.
AI triage
Themomentic-mobile CLI has no ai classify or ai triage commands. For
mobile failures, use the
momentic-maintain skill with the
hosted Momentic MCP server for run history and
quarantines and the
mobile MCP server for run
artifacts.
Run tests into a results directory, then triage failures from that directory:
--no-save. Triage never overwrites a
category you set by hand in the run viewer.
A failure that was transient or came from outside your test can end with No
test change: a successful outcome that keeps the test as it is. Triage
delivers a repair only when it changes the test or a module, so it does not open
a pull request when those files are unchanged.
Example triage transcript and repair
Example triage transcript and repair
A failing Triage reads the failing runs, tests candidate fixes in a live browser, and
reports each repair with its reasoning:The The test previously submitted an empty form, so the page showed the
username-invalid error and the password-invalid assertion could never pass.
Triage restored the intended login flow instead of weakening the assertion.
run identifies the failed step and suggests the triage command:slow-nav repair was written to disk as:slow-nav.test.yaml
momentic-maintain with
the run ID.
To keep CI passing while a heal is pending, see
Let the verdict gate CI.
For CI, make sure triage runs even when the test step fails. Each repair attempt
starts a browser, so if browsers run locally, size the runner for up to one
browser per --parallel worker (one by default):
.github/workflows/momentic.yml
momentic ai reference covers
alternative run selectors, queue filters, parallelism, delivery overrides, and
exit codes.