Recipes
Triage the inbox and start a run within a price limit, with the CLI, REST or an MCP assistant.
Two common jobs, each with the v12 CLI, REST and an MCP assistant. The REST examples read an API key from V12_API_TOKEN; the API quickstart shows how to make one.
Triage the inbox
v12 findings list --status open --severity critical,high
v12 findings status fixed F-12 F-15 --reason "Fixed in #482"
v12 findings assign me F-12
v12 findings comment F-12 --body "The fix is in #482."Inside a Git clone, the CLI takes the repository from origin, so findings list shows that repository's inbox. Pass --repo owner/name to pick another repository, or --org to list every repository.
The same rules apply everywhere:
- Each request makes one kind of change: a status, a severity, an assignee, or a dismissal.
- A status change and a dismissal both need a
reason. - Findings already in the requested state are skipped, so repeating a change is safe.
open,fixedandfalse-positiveare recorded at a position: the head of the default branch, unless you passrepositoryandat(--repoand--atin the CLI).investigatingandwont-fixapply to the finding everywhere. See Status.
Start a run within a price limit
v12 runs start --repo acme/api --at branch:main --max-price 25 --watchThe command estimates the run and prints the price, asks you to confirm, then starts the run with the quote and a maximum of $25. --max-price is in dollars; --max-price-cents takes cents. Without either, the quoted price is the maximum. --watch follows the run until it ends, then lists its findings.
In CI, add --yes. Without a terminal to confirm in, the command otherwise stops with exit code 2.
Errors to expect, all listed in the error reference:
price_exceeds_max: the price is above your maximum.detailshaspriceCentsandmaxPriceCents.quote_stale: the quote expired, or what it priced changed. Estimate again.insufficient_credits: the workspace needs more credit; see Add credit.spend_cap_reached: the workspace hit its monthly limit.
The CLI exits with code 5 on each of these.