When something goes wrong
Troubleshooting
-
claudenot found. Install Claude Code and make sureclaudeis on your$PATH;phax agent probelists what phax finds. -
A gate keeps failing. The run pauses once the fix attempts are spent. Read the attempt logs,
~/.phax/runs/<namespace>.<name>/phase-NN/checks-attempt-NN.log. Attempts are numbered once per phase: a resumed phase continues at the next number and never overwrites an earlier attempt's files, so the last attempt is the highest-numberedchecks-attempt-NN.log. Fix the cause (or raiseagent.maxFixAttempts), thenphax resume <run> --yes, which runs the gate again first. To start the phase over instead,phax reset-phase <run> --yesbefore resuming. -
Lock conflict. Another phax is working on that run, or one died;
phax unlock <run>clears a stale lock. -
The handoff is missing. The phase ended in
handoff_failed:phax enter-phase <run> <phase-id>takes you back into its session (phax enteropens only the final phase's). See When a run stops. -
A rate or usage limit. The run stopped at exit 8 and keeps its place:
phax resume <run> --yeswhen the limit resets. -
A failed agent session. A command printed
✗ <provider> session failed (<kind>): …with the files to read: the cause,agent-error.logand the transcript. Read Troubleshooting a failed agent session to tell whether to retry, resume or fix something. -
Exit 14: the provider could not be reached. The network was down. Retry the printed command once it is back; a paused run lists as
rate_limitedand continues withphax resume <run> --yesstraight away, in a new provider session in the same worktree. A Codex session keeps waiting for the network instead of ending: interrupt it, then resume. A record refused right after it (following the failed session) was a consequence of the outage, and the retry writes it. See Troubleshooting a failed agent session. -
Records refused: the visibility could not be determined. The refusal quotes
gh's own first line. For a network failure, retry once the network is back; for an authentication failure, rungh auth login, then retry. Only for another reason (no GitHub remote, say) setrecords.destination.acknowledgedUnknownVisibilityonce you have confirmed the repository is private. -
A plan with a source spec is refused for lacking
completes-spec. A plan whosesource-specnames a spec must carrycompletes-spec: true(its run completes the spec) orfalse(more plans follow);plans lint,artifact approveandrunrefuse it with exit 12. Add the key by hand, then re-approve an Approved plan, since changing the value makes it stale. A headless plan's older.jsonsidecar lackscompletesSpectoo: re-author or delete it. -
Approval records are per-artifact files. Approval records were one shared ledger per kind; each is now a file of its own under
docs/plans/approvals/anddocs/specs/approvals/. After upgrading,phax artifact approveandphax runrefuse with exit 12 whiledocs/plans/approvals.jsonordocs/specs/approvals.jsonexists. Run the one-time migration, which splits both ledgers into record files in one commit: -
Approvals name their approver.
phax artifact approveandphax artifact reopennow take--by operatoror--by machine:<grant>(a kebab-case slug). Without a terminal they refuse with exit 12 unless given--by, so add it to scripts and loops; from a terminal the default is the operator, named as git commits (GIT_COMMITTER_NAME, elseuser.name), and an operator approval with neither set refuses. New approval records carryapprovedBy; records written earlier read asunattributedand are never rewritten by a read. -
Spec and plan documents carry questions. A spec or plan can hold open and arbitrated questions, each named by id, and
phax artifact statusprints aQuestions:line counting them. After upgrading, runphax artifact migrate-documentsonce in the main checkout:phax artifact approveandphax artifact reopenrefuse with exit 12 until every live headless sidecar is at its current shape. The command rewrites each older sidecar, re-renders its body keeping the frontmatter, and commits exactly what it wrote in one commit. It refuses, writing nothing, on an invalid sidecar, on a body that is not its sidecar's own rendering (a hand edit would be overwritten), or on an uncommitted change to a path it would write. It names the Approved artifacts it leaves edited since approval, with their open question ids, and the plans it leaves stale. A spec question whose rationale opens withDecided by the author on <date>becomes arbitrated, lifted and unattributed; every other question stays open.abandonis not refused.complete(exit 12) and run completion refuse only a current-shape spec still holding a summary placeholder. Each surface element of a spec now carries asummary: a sidecar stamped below 0.27.0, or written before$schema, is lifted with a placeholder on every element,migrate-documentsrestamps it and counts the summaries to write per spec, andapproveandcompleterefuse a spec until every placeholder is replaced. -
migrate-documentsrefuses a plan whose test strategy is prose. A plan document now holds each phase's test strategy as test lines. A plan sidecar stamped 0.26.0 or below whose every test strategy line follows the line format is lifted to those lines; one holding prose is refused with exit 12, writing nothing, naming the phase and its first departing line:Each line reads
- <guarantee> — <size> · <technique> · <oracle> · <loop>[ · <criterion>], one per line under the phase's### Test strategyheading, or a lone- (none).
Something else? phax report <run> opens a GitHub issue with the run's telemetry.