skip to content

When a run stops

The closed sets a run shows when it stops or asks a question, including outcomes, dispositions, ledger statuses, prompt kinds, run states and exit codes.

The handover vocabulary

Handover vocabulary — 12 sets exported from src/engine/reference_vocabulary.rs

Stage outcomes

7 values from src/domain/mod.rs

How one stage ended. `StepOutcome` separately names the result an `if` step tests.

value as the code writes it what it means
ok ok The stage completed successfully.
amber amber Reserved for goal verification. No current build path emits it.
rejected rejected An agent's declared verdict rejected the work. The record carries the verdict word beside this token.
failed failed A gate failed or an agent did not finish its work.
errored errored A resume closed an orphaned `stage_started` record after its owner died mid-task, or a checkpoint refusal closed its Support stage. An agent that failed to launch or authenticate ends its stage as `failed`.
oversized oversized The agent ran out of room or time before it could finish. No build path writes it as a stage outcome today; it is kept for old journals, and a ceiling reached now is recorded as the ledger status `OVERSIZED`.
note note The stage recorded information and continued.

Run dispositions

3 values from src/engine/run/projection.rs

The terminal verdict the run projection derives. `RunComplete` is `success`; an operator pause is `resumable-stop`; other stops are `failure`. Legacy `terminate` records retain those three verdicts.

value as the code writes it what it means
success success The run projection found `RunComplete`, or a legacy `terminate` record with the `success` detail. A nested run has its own projection.
failure failure The run projection found a non-pause stop, or a legacy `terminate` record with the `failure` detail. The stop record says what failed.
resumable_stop resumable-stop The run projection found an operator-pause stop, or a legacy `terminate` record with the `resumable-stop` detail. The run remains unfinished.

Stop classes

6 values from src/engine/pattern_language.rs

The engine-assigned classes for stop records and `on_stop` selection. `any` is a catch-all; `record` and `merge` select no hook.

value as the code writes it what it means
step step A producing step ended as `failed` and no pattern route handled that outcome.
absence absence A required branch or runtime binding was absent and no pattern route handled that absence.
plan plan Plan handling could not produce executable work.
gate gate A gate stop escaped ordinary gate routing.
record record The run record cannot safely support execution or resume. `record` selects no hook.
merge merge Merge or merge-repair work could not be completed. `merge` selects no hook.

Stop identity routes

3 values from src/domain/mod.rs

The `stop_identity.route` values on stopped run events. Engine stops carry `class` and merge-class stops can carry `merge_kind`; operator stops carry `operator_kind`.

value as the code writes it what it means
pattern pattern An authored `stop` step ended the run. The stop identity carries no class, operator kind or merge sub-kind.
operator operator The operator paused or aborted the run. The stop identity carries an operator kind.
engine engine The engine stopped execution because a condition escaped authored routing. The stop identity carries a class, and merge-class stops may carry a merge sub-kind.

Stop identity classes

6 values from src/domain/mod.rs

The `stop_identity.class` values on engine stopped run events. `record` and `merge` select no `on_stop` hook.

value as the code writes it what it means
step step A producing step ended as `failed` and no pattern route handled that outcome.
absence absence A required branch or runtime binding was absent and no pattern route handled that absence.
plan plan Plan handling could not produce executable work, including a planning result that produced no work.
gate gate A gate stop escaped ordinary gate routing, including a baseline or admission gate that failed before authored recovery could run.
record record The run record cannot safely support execution or resume under the active interpreter contract.
merge merge Merge or merge-repair work could not be completed.

Stop identity operator kinds

2 values from src/domain/mod.rs

The `stop_identity.operator_kind` values on operator stopped run events.

value as the code writes it what it means
pause pause The operator requested a pause at the next engine boundary.
abort abort The operator requested an abort.

Stop identity merge sub-kinds

7 values from src/engine/run/finish.rs

The `stop_identity.merge_kind` values on merge-class stopped run events.

value as the code writes it what it means
attempt_ceiling attempt-ceiling The merge repair pattern exhausted the attempt ceiling for one merge state and target.
checkout_drift checkout-drift The main checkout is no longer on the run's home branch, so the merge would land where the run does not belong.
finalization finalization The work around the merge stopped the run: the final sanity test run, the post-merge gate, committing the ledger's trailing rows, or a partial merge with nothing to ship. It is also what a merge stop carries when it names no other sub-kind.
gate_red_handover gate-red-handover A legacy merge stop recorded that a gate-red repair route produced a handover. No current path writes this sub-kind.
git_plumbing git-plumbing A git command the merge depends on failed: the check that the checkout is still on the home branch, or the verified merge itself not landing cleanly.
home_checkout_blocked home-checkout-blocked Git refused to start the final merge, usually because the home checkout has uncommitted or staged changes. No merge was started and nothing in the home checkout changed.
merge_repair_stopped merge-repair-stopped The selected merge pattern stopped before producing an integration that both merges cleanly and passes the gate.

Ledger statuses

4 values from src/engine/ledger.rs

The `status` column of a run's `PROGRESS.md` ledger. Resume skips only a task whose latest row is `DONE`.

value as the code writes it what it means
done DONE The task's latest ledger row records successful completion. Resume skips the task.
amber AMBER Healthy but not finished, reserved for goal verification: the task made sound progress without declaring itself done. No build path writes it today.
failed FAILED The task did not finish. Stops, aborts, pending work, and running work also record as `FAILED`, so resume leaves the task eligible for work.
oversized OVERSIZED The task hit a harness output or context ceiling before producing acceptable work. Resume leaves the task eligible for work.

Prompt kinds

4 values from src/domain/mod.rs

The kind of answer a waiting prompt accepts.

value as the code writes it what it means
confirm confirm A yes/no confirmation, defaulting to no. A headless run answers it yes only when `--yes` was passed, and otherwise answers no without waiting.
text text A free-text answer. Nothing configures a default for a headless run, so a headless run says so and stops rather than inventing one.
investigation investigation The run is blocked and is asking what to do about it. Its answers are the blocker choices below, one launcher token per registered harness ahead of the four fixed ones. A headless run answers `stop-run`.
choice choice A pick from a fixed set of options. A headless run has no way to choose, so it says so and stops; only an interactive run can answer it.

Blocker choices

5 values from src/domain/mod.rs

The tokens for a blocked run's investigation prompt. `proceed` and `stop-run` resolve it; launcher choices do not. `let-gantry-try` is an accepted spelling of `proceed`; a harness launcher is `investigate-with-harness:` plus its harness id.

value as the code writes it what it means
investigate_with_harness investigate-with-harness:<harness-id> Opens that agent harness interactively in the run's worktree, for a look at the blocker. It does not resolve the prompt: the run is still waiting afterwards.
investigate_with_gantry investigate-with-gantry Opens the Gantry Assistant on the blocker, in the run's worktree. It does not resolve the prompt: the run is still waiting afterwards.
open_shell open-shell Opens a plain shell in the run's worktree. Like the other two launchers it leaves the prompt waiting.
proceed proceed Resolves the prompt by re-entering the run's gate-verified execution path. The run re-checks the worktree through its normal recovery path rather than trusting the answer.
stop_run stop-run Resolves the prompt as a stop. The worktree stays on disk with everything the run built, and `gantry resume <name>` picks it up later.

Run states

4 values from src/engine/registry.rs

The lifecycle state `gantry list` and `gantry status` print, derived from canonical records and the run lock.

value as the code writes it what it means
active active Nothing has recorded the run's completion and a live engine holds its run lock, so the run is being worked on right now.
finished finished The run recorded its completion: the full merge into the home branch landed and the worktree was removed. Nothing is left to resume.
partial partial The run's records are on disk, nothing has recorded its completion, and no live engine holds its lock — whether it was stopped, its engine died, or it merged back with only some tasks done. While its worktree is still present, the run can be resumed.
empty empty No durable records on disk and no live owner: the run left nothing behind to read or resume.

Process exit codes

4 values from src/engine/reference_vocabulary.rs

The exit statuses `gantry` chooses. `gantry enter` instead returns the shell status from the run's worktree.

value as the code writes it what it means
success 0 The command did what was asked: a headless build run reached its end without stopping, or a management command succeeded.
failed 1 The command ran and is reporting failure — a headless run that stopped before finishing, a name that matched no run, a declined confirmation, or `gantry doctor` finding a hard requirement missing.
error 2 Gantry gave up before or during the work and said why on stderr: an argument it could not read, a plan it could not open, a preflight it could not pass. Nothing about the run's own progress is implied.
panicked 101 Gantry panicked. 101 is rustc's conventional status for a panic, which the TUI's panic hook exits with by hand so a panic inside a raw-mode terminal still reports it.