Skip to main content

Module exit

Module exit 

Source
Expand description

Deterministic exit-code taxonomy — stable contract for agent orchestrators.

Orchestrators (systemd timers, CI runners, other agents) branch on exit code alone: 0 = go, 4 = sleep and retry, 3/7 = fix config. Changing a code is a breaking change, so the numeric values are pinned and the mapping from crate::cmd::CmdError is exercised by tests.

Mirrors the plan’s taxonomy:

CodeClass
0success
2usage / argument error (clap emits this)
3auth (401/403)
4rate-limited (429)
5wallet / chain / signing
6server (5xx after retries) / network
7validation (422, 4xx other)
70unimplemented (transitional, scaffold-only)

Enums§

ExitCode