Exit codes and environment

Exit codes

CodeMeaning
0Success
1Generic failure (refusal, bad arguments, no project config)
2Plan or config validation
3Unsafe git state
4Gate failure (after the fix loop is exhausted)
5Agent invocation error (Claude, Vibe, or Codex)
6Archive blocked by a dirty worktree
7Lock conflict
8Rate or usage limit hit (resumable)
9Phase produced no changes (resumable)
10Registry corruption
11Security or preflight refusal
12Artifact lifecycle refusal

phax prune uses a subset of these codes: 0 when every selected run was pruned, for a --dry-run preview, or when there is nothing to prune; 1 when nothing was deleted (a bad selection, no project config, or a declined or missing confirmation); 3 when at least one selected run was kept; 7 when a selected run is locked.

Environment variables

phax has no runtime-configuration env vars — the state root, telemetry, and security posture are all set in phax.json (and ~/.phax/telemetry.json), not via the environment. The one variable phax honors gates the opt-in real E2E suite:

VariablePurpose
PHAX_E2E_RUNSet to 1 to enable the real E2E suite (pnpm test:e2e:real)