Skip to content

Exit codes ​

Exit codes are part of Tamperward's public surface and are the authoritative pass/fail signal — a program should key on them even when it also parses machine output, because the exit code is the contract even if a document is truncated. The JSON schemas describe data shape; the exit code describes process status. They agree.

The four codes ​

codemeaning
0Clean — no blocking finding, verdict VERIFIED, or work already done.
1A blocking finding, a masked failure, or a suite that is red.
2Cannot evaluate — fails closed. Policy error, bad --diff range, no view, not a git repository, unresolvable base/revision, --require-ancestor refused, budget exceeded. Always one clean tamperward: … line on stderr, never a stack trace.
124run only — AGENT_TIMEOUT: --agent-budget expired and post-timeout enforcement was clean.

Fail closed is the rule. A crash is a verdict the gate could not reach, so anything uncaught exits 2 (never 0, never 1) with one clean line — a bad --diff revision, a --worktree outside a repository, an invalid policy reaching allow. The in-loop hook / sweep surfaces are the deliberate exception: they emit a deny as JSON on stdout at exit 0, because exit 2 would make Claude Code ignore the JSON and proceed.

By command ​

command012124
checkno blocking findingat least one blocking findingcannot evaluate: policy parse error, malformed --diff range, no view given, not a git repository, or an unresolvable revision—
verifyVERIFIED, or a MASKED_FAILURE cleared by a compact tw1:<digest> or legacy verify@<full-sha> approvalMASKED_FAILURE or SUITE_REDCANNOT_VERIFY / BUDGET_EXCEEDED — fails closed—
runenforcement clean and the agent exited 0 (a non-zero agent exit is passed through)any blocking finding or masked failure, including a non-quiescent process after timeoutcannot adjudicate: dirty start, policy error, verify cannot runAGENT_TIMEOUT: --agent-budget expired, post-timeout enforcement clean
trace-verifyevery requested trace run completed greenone or more traced runs were non-zero/incomplete; report still emittedunsupported platform, missing tooling, bad base/policy/options, or tracing failure—
doctorconfigured verify job(s) have sufficient static outer time for the trusted policy—missing/invalid workflow, no verify job, missing/malformed/insufficient timeout, or trusted policy cannot be loaded—
statsaudit events validated and summary printed—explicit file missing, malformed/unknown event, bad --since, or no default store resolvable—
research run / research summarizeevery requested pair recorded (or already was); summary printed—cannot start or set a trajectory up (bad manifest, unknown adapter, root/unsupported platform, unclonable repo, invalid ledger) — the agent's own exit is data, never the research exit—
allowsign-off recorded—no rule or --reason, not a git repo, or no current blocking finding to sign off—
initwired, or already wired—an item needs attention (e.g. a symlink where a file was expected)—
onboardposture READY or READY WITH WARNINGSposture BROKEN or INCOMPLETErefused (not a git repo, non-interactive stdin without --yes, an uncontinued dirty tree) or aborted at a prompt—
hook claude / sweep claudealways — a deny is JSON on stdout at exit 0—only for an unsupported agent name—
hook-servicestarted, stopped (or nothing to stop), or status printed—unsupported platform (Windows), a runtime directory another uid owns, or a service already listening—
no or unknown commandhelp printed (no command)—unknown command; help printed—

See also ​

Apache-2.0. Every headline number is measured; the pre-registered predictions — including the refuted ones — are committed to the repo.