Skip to content
Select theme

CLI exit codes

AI agent getting started? Read Agents: start here first.

Use the process exit code to decide whether a CLI command completed, was refused or needs investigation.

Code 0 indicates success. A nonzero code identifies the class of failure; read the command output for its specific reason. An unknown write outcome does not prove the write failed: check it before retrying.

CodeMeaning
0Success
2Client refusal: configuration, host form or store.
3Unauthenticated: sign-in is required or did not complete.
4The platform refused the operation.
5The host’s outcome is unknown.
6Invalid request, missing subject or exceeded bound.
7The host failed or did not answer.