Reviewing and landing
Review and land
A run at review_open has done its work on the last phase's branch; nothing has landed. You find there a review-handoff.md and the reconciliation of the whole run, against its plan.
review-code starts from the reconciliation and the compliance findings rather than a blank prompt, and follows the phax-review skill: it uses the change before reading its code, works from the user inward, and looks for what the run's tests cannot catch, each finding naming why they missed it. A copy at .claude/skills/phax-review/SKILL.md on the run's branch replaces the bundled skill. Running it again resumes the session, and --new-session starts over. Its model is review.code in phax.json, claude-opus-5-5 at high effort by default, or --model and --effort.
phax review-code <run> --headless runs that review without a person. It follows the same skill in a read-only session (its reading tools and read-only git), answers with its final message, and phax writes the findings to code-review.json: each with a severity, a file and line, a lens, an escape, a criterion and a suggestion. It records its session, so phax review-code <run> resumes it on the provider that ran it, to ask for the fixes; --new-session starts a new session that becomes the recorded one and detaches it from code-review.json, which is left as it is. A refused answer, a failed session or a session that changed the worktree (its changes are put back) leaves code-review.json and the recorded session as they were, and exits 1 with the retry command; the session's cost entry and transcript are still kept. To get it with every run, set "review": { "code": { "enabled": true } }, read the ## Review findings section in the pull request, then fix each finding with phax finding fix <run> <id> -- <path>…, or settle it with dismiss or defer. A fate is written on phax/records/v1, so it needs records on. From a script, every fate names its arbiter with --by, and only the operator dismisses or defers; fix --commit <sha> records a commit you already made.
Three steps run on their own when a run reaches review, if phax.json turns them on, and can be run by hand. None can fail the run.
The compliance review changes nothing. phax publish-pr <run> writes a short description: a run summary with the compliance verdict, one line per phase, what needs your review (unexplained deviations, compliance attention points), a Review findings section (every finding by fate: open and deferred named, fixed and dismissed counted), the review notes, and where to read the full review handoff, ~/.phax/runs/<namespace>.<name>/review-handoff.md, on the machine that ran it. When the description is too long, it cuts unexplained deviations first, then attention points, deferred findings, open findings and last the review notes. With publish.auto on, phax finding fix, dismiss and defer then comment on the pull request (see docs/findings.md). A review run by hand never updates an open pull request. The compliance review's model is review.compliance, claude-sonnet-5-5 at medium by default. publish-pr needs a GitHub remote and an authenticated gh; the remote, base branch and title are set under publish.
The description ends with a phax footer, for example:
The plan and the spec (the source-spec of the run's plan) are permalinks at the head commit of the published branch, each named where it lives in that commit's tree: its recorded path, else its archive/ counterpart. The summary's **Plan** names the plan the same way. A loose plan (outside docs/plans/), a branch publish-pr did not push (publish.pushBranch: false, so the host may not hold that commit), a web URL gh repo view cannot give, or a head commit phax cannot read gives a code span instead of a link; with no readable head, the plan is named at its archive/ counterpart and the spec is left out. A run that recorded no plan path names its plan as plain loose plan text. A plan with no spec has no **Spec** part. The agents are the provider, model and effort each committed phase ran with, read from its agent-binding.json and counted per assignment; an interactive phase has no binding and a skipped phase did not commit, so neither is counted. When the description is shortened to fit GitHub's limit, the footer is never cut. A pull request that already exists keeps its description: publish-pr reuses it as it is. There is no setting to turn the footer off.
After the merge
Every run keeps cost-ledger.json: each Claude invocation's own API-list cost, tokens, duration and subscription-window samples. archive moves it with the run, and prune keeps a copy in ~/.phax/cost-ledgers/.
archive moves the run's folder and its worktrees under ~/.phax/archive/<namespace>.<name>/ and keeps the name taken. It accepts a finished run (review_open, completed) whose final worktree is clean; an unfinished run or a dirty worktree needs --force, and a running or locked run is refused.
prune deletes archived runs for real: the archive folder, the worktrees' records in Git, the run's local branches, and its entry, which frees its name and its disk space. It shows what it will do first, asks in a terminal (--yes otherwise, --dry-run to only look), works on this repository's runs only, and never touches the records branch, remote branches or pull requests. Before it deletes the archive folder, it copies the run's cost ledger to ~/.phax/cost-ledgers/<namespace>.<name>.<run-id>.json; if the copy fails, the run is kept. A run whose branches hold commits found nowhere else is kept, unless you pass --force; a branch checked out somewhere keeps its run even then.