gatelineAPI reference
interface DispatchOutcome {
    costUsd: null | number;
    error: null | string;
    fatal?: boolean;
    harvest?: null | { base: string; branch: string };
    ok: boolean;
    refused?: boolean;
    resumeRefused?: boolean;
    session?: null | string;
    tokensIn: null | number;
    tokensOut: null | number;
}

Properties

costUsd: null | number

Reported by the harness, when its manifest says how to read it.

error: null | string
fatal?: boolean

Retrying cannot help (e.g. a fold conflict = plan defect): escalate now.

harvest?: null | { base: string; branch: string }

Present when the dispatcher harvested the agent's work to a branch the engine folds (the remote runner, run "runner-agent" ADR-3/ADR-4). base is the commit the harvest branch was committed on top of (the dispatch's pinned base OID) — what the fold rebases onto the run tip. Null/unset for the local headless dispatcher, which leaves working-tree changes for the engine's own local checkout to carry directly on the run branch.

ok: boolean
refused?: boolean

No process was ever spawned (#155): the dispatch was refused before the harness ran — a held checkout, a preflight error. True cost is zero and the ledger says so; the entry is neither a failure nor a retry spent, because the agent never got to try.

resumeRefused?: boolean

A resume was asked for and the harness would not take it, so the dispatch ran fresh instead (#181). The engine logs it; nothing else changes — every other field here belongs to the fresh attempt.

session?: null | string

The harness's own session for this dispatch (#181), when its manifest says where to read one. The engine records it on the ledger entry, so a retry of the same role+task+round can resume where this attempt got to.

tokensIn: null | number
tokensOut: null | number