Skip to content

Exit codes

CodeMeaning
0Command succeeded; all selected quality gates passed.
1A quality gate failed, detect found no supported project, or loop ended without passing.
2Ward could not run: bad usage, missing/invalid configuration, no project, no enabled gates, an integration conflict, or a doctor error.
Command012
checkAll selected gates passedAt least one gate failedCould not run
detectProject detectedNo supported projectCould not run
initConfiguration created—Invalid usage, cancelled, or could not initialize
integrateInstalled or removed—Conflict or invalid usage
doctorNo ERROR findings—At least one ERROR finding
loopPASSEDAny other terminal stateInvalid usage
spec validateNothing to reportFindings or an unsuccessful spec validationCould not run
spec guardAllowedRefused; the reason is on stdoutCould not decide
hook claude-codeGates 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.