dLazy AIdLazy AI
Reference

Exit Codes

How the CLI maps failures to process exit codes.

ExitWhen
0Success — { ok: true, result } written to stdout
1Runtime / network failure — e.g. task_failed, timeout, network_error, unauthorized, insufficient_balance, cli_version_too_low
2Input / config error — e.g. tool_not_found, missing_field, bad_ref, no_stdin, input_file_not_found, input_file_bad_json

Exit codes pair with the CLI's { ok: false, code, message, details? } envelope: machines branch on code, humans read message, shells can short-circuit on $?.

if ! dlazy gpt-image-2 --prompt "..." > out.json; then
  case $? in
    1) echo "runtime / network failure" >&2 ;;
    2) echo "bad input — check args" >&2 ;;
  esac
  exit 1
fi