Skip to main content
Exit codes are frozen — branch on codes (and the error envelope’s code), never on message text. Codes are 0 success · 1 unexpected · 2 usage · 3 auth · 4 not found · 5 permission/scope · 6 plan/limit · 7 rate-limited · 8 cancelled (a human aborted a prompt with EOF/Ctrl-C) · 9 the command ran and the operation did not succeed at its target · 10 a write was accepted and its answer lost — verify, do not retry. Branching on the map from a script:

The exit map