Exit codes
| Code | Meaning |
|---|---|
| 0 | Success. |
| 1 | User error: bad arguments or flags, unknown command, a command not available in this build, a secret passed as an argument, a missing entry, a declined confirmation, a hygiene refusal, a chain fingerprint that does not parse, a privilege write on a code branch that does not track the default branch (not-default-branch). |
| 2 | Policy or verification failure: a write the fold would reject, a rollback, a vault merge conflict, concurrent values on get, the agent nudge, doctor error findings, scan findings, a request the agent daemon refuses (an agent session, policy, a denied or expired approval, an unapproved program), a broken audit log chain, a branch that is not safe to use as the sync branch (unsafe-sync-branch: it is a code branch), a policy fork or rollback (policy-fork, policy-rollback, also from the git history check), a git history that cannot be checked in full (history-unchecked), a vault that moved to a sync branch (vault-migrated), a chain that does not hold the expected link (expect-head-mismatch), a privilege write whose outcome changed after a lost race (policy-changed), a policy record kind this build does not implement (upgrade-required). |
| 3 | Locked or unavailable identity or daemon: no terminal and no VAULTFOLD_PASSPHRASE_FD, too many wrong passphrases, a locked vault or credential store, a cancelled confirmation, a request waiting for approval (vaultfold agent approve), a rate limit, an agent daemon endpoint that does not answer or speaks another protocol version, agent status with no daemon running. |
| 4 | Backend or network failure: git (missing, too old, fetch, push, hook or signing failure), a push the forge's branch rules refuse (sync-protected; the message quotes the forge and names the remedy, and the events stay queued), the filesystem, a forge key fetch, a lock not acquired within 10 seconds, an OS keychain that cannot be used in-process (including in an agent session without a daemon), a privilege write with the backend unreachable, three races lost to new policy links or two minutes of them (policy-busy), a publish whose outcome is unknown (publish-unknown). |
A prompt canceled with Ctrl-C exits 130 (after restoring the terminal), whatever the command.
run exits with its child's status (128 plus the signal number for a child killed by a signal on POSIX). With --json the error envelope carries a stable code string beside the exit code.