Skip to content
PatchArc

Exit codes and output

How patcharc signals success and failure, the shape of its output, and how to consume results from scripts.

validated against patcharc 0.2.0 · 2026-08-22

Exit codes

CodeMeaning
0Success. Also returned by status with no active Arc and by every print-only command
1Any error: not in a repository, no active Arc, verify found issues, network failure, login required, unknown flag or wrong argument count

Only verify turns the content of a file into a non-zero exit; use it as a gate in scripts and CI.

Output conventions

  • Success lines start with ; failures with .
  • Detail lines are indented two spaces with aligned labels (goal:, key:, ArcLink:).
  • Errors go to stderr as patcharc: <message>.
  • There is no --json flag and no --quiet flag in 0.2.0.

Machine-readable data

Read the capsule directly instead of parsing console output:

$ unzip -p capsule.parc manifest.json | jq '.totals'
$ unzip -p capsule.parc evidence/summary/review.json | jq '.risks[].text'
$ unzip -p capsule.parc evidence/file_changes.json | jq 'length'

patcharc serve also returns the review as JSON at /api/capsule?file=<absolute path> after verifying the capsule.

Common error messages

MessageCause
not inside a Git repository or PatchArc session (cwd=…)No .git or .patcharc found walking up from the current directory
.patcharc/ already exists; use --force to reinitialise (this will rotate the signing key)init on an initialized repo
no active sessionnote, decision, risk, checkpoint, or stop without a running Arc
share: not logged in — run patcharc login firstNo credentials file
share: no sealed capsules in … — run patcharc stop firstNothing in .patcharc/capsules/
share: invalid --visibility "x" (want public|private|team|capability)Unknown visibility
share: capsule processing failed (step "verify_manifest_and_archive": …)The server could not verify the capsule
share: timed out waiting for capsule processingMore than 2 minutes in verifying; check /v1/capsules/:id/status
login: device code expired; run patcharc login againApproval took longer than 10 minutes