Exit codes
| Code | Meaning |
|---|---|
0 | Command succeeded; all selected quality gates passed. |
1 | A quality gate failed, detect found no supported project, or loop ended without passing. |
2 | Ward could not run: bad usage, missing/invalid configuration, no project, no enabled gates, an integration conflict, or a doctor error. |
| Command | 0 | 1 | 2 |
|---|---|---|---|
check | All selected gates passed | At least one gate failed | Could not run |
detect | Project detected | No supported project | Could not run |
init | Configuration created | — | Invalid usage, cancelled, or could not initialize |
integrate | Installed or removed | — | Conflict or invalid usage |
doctor | No ERROR findings | — | At least one ERROR finding |
loop | PASSED | Any other terminal state | Invalid usage |
spec validate | Nothing to report | Findings or an unsuccessful spec validation | Could not run |
spec guard | Allowed | Refused; the reason is on stdout | Could not decide |
hook claude-code | Gates passed and no spec findings; always for Stop events | — | Gates failed, spec findings, or could not run (reported to the agent on stderr) |
For scripts, combine the exit status with check --format json to inspect individual results.
JSON mode keeps stdout machine-readable; diagnostics are written to stderr.
UNAVAILABLE means an enabled gate could not start its configured executable; it is still a
reported gate failure and therefore exits 1. EXECUTION_ERROR means a process started but was
interrupted or its output could not be captured; it also exits 1. Exit 2 is reserved for
configuration or Ward setup errors that prevent a normal report.