Skip to main content
Reads a markdown scenario, provisions the mirrors it needs, executes the scenario (either via a driver or by letting a coding agent run against the session), and evaluates the success criteria. The canonical entry point for CI, pre-merge gates, and agent validation runs.

Common invocations

How a run works

Output

Human-readable default:
Machine-readable with --json:

Flags

integer
default:"1"
Execute the scenario N times in a row. Between runs, all mirrors in the session are reset to their seeded state. The final score is the mean percentage of criteria passed across runs.
string
Run against an existing session instead of provisioning a new one. The session must have all mirrors the scenario requires. Use this when you want multiple scenarios to share warm mirrors.
enum
Name the agent driving the scenario. Options: claude-code, cursor, copilot, cline, custom. Affects how Mirra hands the prompt and how the run is logged. Default is custom (you’re running a test driver, not an agent).
string
Override the scenario’s declared fixture for this run. Same format as in the scenario file: resend:transactional-busy.
duration
default:"60s"
Per-run timeout. If the run exceeds this, it’s terminated and counted as a failure. Lift with longer scenarios or slow agents.
float
Exit non-zero if the satisfaction score is below the given threshold (0.0–1.0). Use this to gate CI: --fail-below=0.9 means CI fails if fewer than 90% of criteria pass.
boolean
default:"false"
Emit the final result as one JSON line on stdout. Combine with --quiet to suppress the per-run log.
boolean
default:"false"
Suppress live progress output. The final summary still prints (or just the JSON line if --json).

Exit codes

Driving the scenario

mirra run doesn’t execute code on its own. It needs a driver that turns the scenario’s ## Prompt into actual work against the session. Three common drivers:
Hand the prompt to a coding agent via the MCP server. The agent reads mirror state, fires requests, and writes code that operates against the session. Used for agent evaluation.
See Guide — First scenario for an end-to-end walkthrough.

Where to go next

Scenario format

Every valid section, every config key, every edge case in a scenario.

CI integration

Wire mirra run into GitHub Actions or your CI of choice.