Docs · Guides

Running workflows

The short version#

Ask Claude in plain words: "run doc-refresh on docs/guide.md, the install section". The run skill picks the workflow from the catalog, asks for any value the workflow needs (it never guesses one), preflights the run, starts it, and reports how it ended. When the run pauses for a person, it explains the pause and waits for your decision. It never decides for you.

The rest of this guide is the CLI underneath, for when you want to drive runs yourself.

Find and inspect a workflow#

shell
tempergraph list                       # the workflow catalog
tempergraph graph <workflow>           # the workflow diagram
tempergraph outcome show <workflow>    # what a good result is, and how runs measure against it
tempergraph config show <workflow>     # the settings a run would use

Check, then start#

shell
tempergraph run <workflow> --check [--input key=value …] <request…>
tempergraph run <workflow> [--input key=value …] <request…>

--check spends nothing. It prints one JSON status: ok, needs (questions to answer first), error (refusals and how to fix them) or broken (the workflow did not load).

Useful options on run:

OptionDoes
--run-cost-cap USDStop the run before it spends more than this
--auto-reopen NRetry the whole run up to N times after a failure
--approve <step>Pause for your approval after that step
--model, --judge-modelPick model aliases for steps and judges
--jsonMachine-readable output, for scripts

--dry-run is not a preview: every step still runs and spends. Only the issue filer stays quiet.

How a run ends#

ExitMeaningWhat to do
0Finished; every step passed its gateRead the outcome verdict, cost and branch
2Refused; nothing ran or was spentFollow the message; run --check shows the same refusal
3Paused for a personDecide, then resume (below)
4Stopped or drainedResume with the command the message gives
5Retries spent, timeout, loop budget or infrastructure failureNot a success. Read the logs, then rerun or fix the workflow
127Engine not installedSee Getting started

At exit 3 and exit 5 the run also prints the reads that explain it, after the resume command: tempergraph status <thread> --detail --unit <step> and tempergraph attention for a pause, tempergraph status <thread> --detail and tempergraph logs <thread> for exit 5 (as next with --json). For a paused thread tempergraph status <thread> --detail always holds a pause block (the unit, the kind, the reason, each blocker, the refused tool access and the guard's facts) with a lines list that reads as the pause's facts, one numbered line each.

Answer a pause#

A pause says which step paused, why, the failing criteria, where the output is, and which decisions it accepts:

DecisionDoes
proceedAccept the output and go on
retryRun the step again, optionally with your feedback
back:<step>Send the run back to an earlier step
stopEnd the run
shell
tempergraph attention                                     # everything waiting on a person, oldest first
tempergraph resume <workflow> <thread> --decision retry --feedback 'Keep the table, shorten the intro'

Add --reason <word> to say why you decided: one of engine_defect, judge_error, environment, plan, request or other. It is recorded on the decision's ledger row and counted in the findings of the improvement loop. A person may leave it out; an agent that decides at a pause (a gate, an ask or a wait) must give it, and the engine refuses its decision without one (exit 2, reason_missing, nothing changed). A breakpoint, a usage-limit resume and --apply-deadline need none.

Use --ruling with your feedback when it should hold on every later attempt, not just the next one. Don't proceed after an infrastructure failure: nothing was judged. The same holds for proceed at a usage-limit pause (below). retry at a command_killed pause (below) starts no step session: it runs the killed commands alone, then the check.

Questions, events and breakpoints#

Some pauses are not about a failed gate. They show their kind in tempergraph attention:

KindWhat it waits forHow to answer
inputAnswers to the questions of an ask step--answers <file> (a JSON object of name and value), or --decision answer:<name>=<value> once per answer. Partial answers are kept; the run goes on when the set is complete
event_waitA value from an outside system--decision event:<name>=<value>. The step's own check decides; proceed is refused
breakpointYou asked for it--decision proceed or stop
escalation, reason usage_limitThe account's usage limit ended a session. Nothing was spent and nothing was judged. The pause gives the reset instant as usage_limit_resets_at (also in the tempergraph status row; null when none was reported)tempergraph resume <workflow> <thread> with no --decision. It runs only the session the limit ended again, under the same attempt, before or after the reset
escalation, reason command_killedA command a gate's check ran passed its time limit and was killed. Nothing was judged. The pause names each command's prefix, folder, base or not, limit, seconds run and last finished duration, never its argumentsretry runs each killed command alone under the gate's limit, starts no step session, then runs the check; it is refused with exit 2 when command_killed_retries is spent. proceed, back:<unit> and stop act as at any escalation
shell
tempergraph run <workflow> 'the request' --pause-before <step>   # stop before a step, with nothing spent on it
tempergraph resume <workflow> <thread> --answers answers.json
tempergraph resume <workflow> <thread> --apply-deadline          # take an overdue wait's declared way out
tempergraph resume <workflow> <thread> --decision proceed --unit <step>   # when two parallel gates wait

A run that took a gate's fallback finishes with degraded: true in its status. Read why before you trust the result.

Watch and inspect#

shell
tempergraph status [<thread>] [--detail]       # one row per run, or one run in detail
tempergraph wait <thread>                      # block until the run ends or pauses
tempergraph wait <thread> <thread> --any      # block until the first of them ends or pauses
tempergraph events <thread> [--follow]         # the run log, record by record
tempergraph logs <thread> --kind raw|check|stderr|engine   # raw session and check output
tempergraph facts <thread>                     # read-only facts about a run
tempergraph stop <thread> [--now]              # drain after the current step, or stop now

A thread is named <workflow>/<task id> or by its alias; a bare task id is refused with the threads it could mean. wait also returns when a running thread records a new gate verdict; wait --any returns only when a thread pauses or ends.

A thread stopped by stop (drain or --now) shows in tempergraph status as unfinished with its resume command, and tempergraph resume <workflow> <thread> with no --decision continues it from the interrupted or next attempt. A thread stopped by a person's decision or a spent budget is refused that plain resume: the message names the unit and the reason, and it re-opens only with --decision retry, back:<unit> or rewind:<unit>.

With the tempergraph-monitor plugin installed, Claude Code also shows running and paused runs, alerts and cost while you work.

Rerun from a step#

shell
tempergraph rerun <workflow> <thread> --from <step> --feedback 'Use the 2.x changelog format'

A rerun is a new run linked to the old one, starting at the step you name. It asks before repeating anything with an external effect.

Cost and supervision#

shell
tempergraph report [7d|30d|all] [--by unit|executor|workflow]   # cost and friction
tempergraph report --supervision                                 # how often runs needed a person
tempergraph supervision show                                     # what supervising them cost

Every model call is costed. Where Claude Code does not report a cost, the engine estimates it and marks it as an estimate. It never counts it as zero.

When something goes wrong#

Ask Claude: "why did my doc-refresh run fail?" The troubleshoot skill reads the run's state and logs without changing anything, and gives you ranked causes with the next command to run.

Outside a git repository#

A plain folder can hold runs too. The state goes to .tempergraph/ in the folder you start in, or the nearest one above it that already has one; --state-root <dir> (before the verb) or TEMPERGRAPH_STATE_ROOT names another place. Runs work in place only, and what needs git is refused before anything is spent: worktrees, --carry, trials, a concurrent map whose step writes (declares write or edit), and rules that count changed lines. A concurrent map that only reads still runs there.

Be told when a run ends#

A hook is a command of yours that the engine starts on a run event (started, unit_entered, gate_verdict, paused, resumed, stop_requested, finished, failed). It gets the event's facts as a JSON file named in TEMPERGRAPH_HOOK_FACTS, never the run's text, and its failure never changes a run.

shell
tempergraph hooks add paused -- notify-send 'A run is waiting'
tempergraph hooks test paused      # run it once against made-up facts
tempergraph hooks list

Carry a run to another machine#

--carry on run keeps the run's scrubbed state on its own branch, so a paused run can be resumed elsewhere: tempergraph carry pull <workflow> <thread> on the other machine, then resume. The branch is deleted when the run finishes.

Edit this page on GitHub · engine 0.9.0