Runs, their journal and their saved context

A run's statuses, its journal and every event in it, the hop cap, its workspace and branch, continue, retry and run again, what each run tool answers, and the context it saves at go.

A run starts from a set of approved context. Smith saves it when you press go so the run can be recovered later.

This page also says what a run is made of and how to read one. File:line citations are in parentheses. The graph a run executes is on templates and nodes.

01statuses#

A run has one of nine statuses.

completed, stopped, failed and rejected are terminal.

02the journal#

Each run keeps an append-only journal at <patch root>/.smith/patch-runs/<id>/events.jsonl. Every line is one event with a strictly increasing sequence. It is the only durable history of the run, and every status, view and tool below is read from it. The event types are at, and there are 60. The run_events and run_query tools read it, so you rarely need the raw file.

the run

envelopes and cords

invocations

gates

model nodes

workspace and secrets

capabilities

checks

03the hop cap#

Every envelope counts its hops, and a cord that loops back makes the count grow. The cap ends a loop that does not converge.

04workspaces#

A ticket run builds in a worktree of its own, made at launch beside the work clone, so several runs can build at once.

05continue, retry and run again#

These are all cards. The operator presses the button on a card, and nothing starts by itself.

06what the run tools answer#

All eight only read. Each answers from the journal.

07retained context#

The snapshot of the exact context text a run was approved with: the persona, memory, knowledge and plugged-asset bodies, flattened by contextsource.Flatten.

If either folder fails these checks the run does not start. See troubleshooting for the messages.