Delegating from an agent
phax is verified delegation for AI coding agents: delegate a change to another coding agent and get results you can verify.
- Each phase runs in an isolated Git worktree.
- Its gate commands must exit 0 before the next phase starts.
- The files it touched are reconciled with the plan.
- Run state outlives your context: phax resume picks up where the run stopped.
- Every command answers JSON with a schema.
Delegate a change
The commands a coding agent calls, in order, each answering JSON:
An agent has no terminal, so every approval names its approver: --by machine:<grant> names the loop or script by a kebab-case grant, and --by operator names the person, as git does. A plan is approved after its spec. A verdict on an open question always comes from the operator: phax artifact decide takes their verdicts file with --by operator and refuses a machine, and with no open question it says there is nothing to decide.
For example, an agent drafts a spec and its plan, lints the plan and runs it. It reads the outcome's kind and the exit code, then the compliance verdict, and each finding's fate with phax finding list --json, instead of trusting another agent's "done".
Read the answers
--jsonon every command writes its answer on stdout and its messages as JSON lines on stderr: see Machine answers.--json-schemaprints the program's contracts as JSON Schema, or one command's after its name, and runs nothing: see Machine answers.- Each exit code names what happened: see Exit codes.
phax --usageprints the full command tree, every command with its flags and arguments.