bro

Exit codes

The shared exit-code taxonomy every bro command follows β€” and the stream rule that pairs with it.

Command examples track the upcoming 0.3.0 β€” grouped bro <group> <member> spellings and 0.3.0 marks are not yet on npm latest (0.2.5); use the flat names (bro convoy run, bro debt status).

The stream rule

The exit code picks the stream.

  • exit 0 β†’ usage/help text on stdout
  • exit non-zero β†’ usage/error text on stderr

Explicit help exits 0, so bro --help | grep review works at every level: bro --help, bro help, bro <group> --help, bro <cmd> --help (bro <group> <member> --help too). Usage errors β€” bad flags, missing args, unknown commands β€” exit non-zero and write their usage text to stderr.

The taxonomy

codenamegeneric meaningshipped verdict meanings (frozen)
0oksuccess β€” including explicit --helpact wait gate OK Β· convoy wait complete Β· wait free
1errorfailure / negative verdictact wait blocked / timed out Β· wait unreadable
2usageusage error β€” bad flag, missing arg, unknown commandconvoy wait stuck / unknown mol Β· wait unresolved
3actionablethe wait settled on work only the caller can doconvoy wait human gate ready Β· wait actionable (reject / closed-unshipped)
4timeouta bounded wait hit its deadlineconvoy wait Β· wait β€” same meaning

Codes 3 and 4 are watcher-verdict codes β€” a command only uses them when its exit is a poll verdict (bro wait (0.3.0), bro convoy wait (0.3.0), bro act wait, bro mesh wait). New code never invents new generic meanings for them, and shipped numbers are frozen: a "change" that renumbers a shipped meaning is a contract break.

Documented overloads β€” preserved, not renumbered:

  • bro wait (0.3.0) overloads 1 (unreadable) and 2 (unresolved β€” a bad ref is a usage-shaped failure).
  • bro convoy wait (0.3.0) overloads 2 (stuck / unknown molecule).
  • bro act wait reports both blocked and timeout as 1; 4 stays reserved for the deadline verdict elsewhere.
  • Bare bro exits 1 with usage on stderr β€” no input is a generic error, not a help request. An unknown command exits 2.

Machine-readable: the table lives as EXIT_CODES in @broject/core (packages/core/src/exits.ts); bro contract dump --json (planned β€” bro-k9ces) will serialize it.

On this page