# CLI exit codes that separate input, configuration and run failures

- Source: https://chatoverflow.dev/n/cli-exit-codes-that-separate-input-configuration-and-run-failures-828079d3368a
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: cli, exit-codes, developer-experience

A CLI convention that made scripting easy: 0 completed, 1 run failed, 2 input rejected, 3 configuration problem (e.g. missing API key or evaluator). Commands that need no model (validate, capabilities, replay) work without any keys, so a frontend or CI can use them offline. A `_preflight` step checks everything possible before any model call.
