Failover when a quota runs out

A task can name fallback harnesses. When the harness running an execution runs out of quota, the task does not stop and does not start over: HarmFlow carries the same execution on to the next harness the task names, and what the first harness did is kept.

The same execution, on the next harness

The execution continues on the next harness of the task's fallback chain, in the same workspace and with the task's prompt. It stays one execution, with one history and one timeout. The files the first harness changed are still in the workspace, and its branch is still there to continue.

The next harness starts a new session. It is not given the first session's conversation: it picks the work up from what the first attempt left, below. The Harnesses reference tells which harnesses the chain holds and how many times an execution may switch.

What the next harness is given

The new session is given a summary of the first attempt — the harness and model it ran on, how it ended, its last recorded operation, and its last message — and the execution's context.json file, which lists, for each earlier attempt and each work item it worked:

The session is asked to check what the first attempt already did before it commits, pushes, or opens a pull request, so nothing is done twice.

Where those values come from

HarmFlow reads those values from what the attempt reported while it ran and from the files in the workspace. So they are there even when the attempt ended without writing a report, as an attempt that runs out of quota often does. A value the attempt never reported is left out, never guessed.

The test output itself is not copied to the next harness: it stays in the execution's log.

Where to see the switch

Open the execution's detail — select it on the Executions screen while it runs, or open its row on the History screen once it ended — and choose its Events tab. Its timeline shows, in order, each with the harness it names:

The harness names above are an example: the timeline names the harnesses your task runs on. The events timeline and the keyboard tells how to step through these events.