stax
Command reference

Exit Codes

CLI exit code reference for scripting and CI integration

Every stax command exits with a numeric code indicating success or the category of failure. Use these codes in CI pipelines and scripts to handle different error conditions.

Reference

CodeMeaningCommon causes
0SuccessCommand completed without errors
1Validation errorMissing required fields, invalid paths, bad frontmatter
2Build errorLayer exceeds size limit, archive safety violation
3Registry errorAuthentication failure, network error, repository not found
4Package resolution errorDependency cycle, missing package, version conflict
5Materialization compatibility errorNo compatible adapter, lossy translation (when strict mode enabled)
6Signature / verification errorMissing or invalid signatures, expired attestations

Using exit codes in CI

# Fail the pipeline on any validation error
stax validate || exit 1

# Distinguish between build and registry errors
stax push ghcr.io/myorg/agent:latest
case $? in
  0) echo "Pushed successfully" ;;
  2) echo "Build error — check layer sizes" ;;
  3) echo "Registry error — check authentication" ;;
  *) echo "Unexpected error: $?" ;;
esac

On this page