Controlling execution lifecycle: pause, resume, and human authority
A compliance reviewer spots mismatched invoice totals mid-batch. The only knob on the console is Cancel. She kills the run, loses forty minutes of good extractions, restarts from zero, and hopes the poisoned file doesn’t sneak back in. Or she lets the bad run finish because restarting is worse.
That is the decision moment pause/resume exists for.
Scroll-stopper: If the only lifecycle knob you offer is kill, you train operators to over-correct or under-correct — never to hold the mic mid-sentence.
So that humans can intervene in flight — preserve position, inspect, correct — without always paying the nuclear cost of cancel. Canon Principle Five as infrastructure: AI proposes; humans decide — including mid-run.
Pause is not cancel
Human-in-the-loop is not a dashboard sticker. It is a runtime contract.
- Cancel says: discard outcomes; clean up; treat the run as terminal.
- Pause says: stop advancing, preserve position and context, allow inspection, then resume when the human is satisfied.
This distinction matters to compliance officers, incident commanders, and anyone who has watched a model confidently proceed on poisoned inputs.
Narrative: compliance hold (receipt moment)
She hits Pause from Command Plane /executions. The worker stops scheduling new steps; the agent yields after the current extraction phase via ctx.lifecycle.checkPaused(). She corrects the source file, records a pause reason, and hits Resume. The run continues from a known-good boundary — no re-ingestion of unrelated files, no mystery duplicate charges.
Provenance records who paused, when, and why. That is the receipt — not a screenshot of a spinner.
State machine (mental model)
Async executions move through operational states; pause and resume are explicit transitions governed by scope human_api:executions:pause (and related invoke policies for cancel/status):
queued— pause removes the job from the queue surface and marks the row pausedprocessing— pause is requested; the agent cooperates by pollingctx.lifecycle.checkPaused()between major stepspaused— human holds the token; resume re-queues with original intent
Why agents must cooperate
Pause during processing cannot be instant magic without unsafe interruption. Cooperative polling keeps filesystem, network, and partial writes bounded: finish the current step, observe paused, stop.
In @human/agent-sdk, ctx.lifecycle.checkPaused() returns whether execution should yield (and optional reason). Long-running loops should call it the way they check cancellation or budgets.
Operator surfaces
- HTTP:
POST /v1/async-executions/:id/pauseand.../resume(reason on pause) - CLI:
human execution list|pause|resume|cancel|status - Command Plane:
/executionslist and detail — visibility turns policy into muscle memory
When to pause vs escalate
- Pause when the human needs time or data correction inside the same run.
- Escalate (
ctx.approval) when a decision or risk acceptance must be recorded before proceeding — even if the model is confident.
They compose: pause the outer run while an approval ticket clears, then resume.
Closing
Pause/resume preserves position and context so humans can intervene mid-run without nuclear cancel. Pair it with governed discovery (agents as tools) so what runs — and when it yields — stays legible.
Go deeper
- Product: Command Plane, HumanOS
- Docs: HumanOS concepts, Execution CLI
- Community: Agents as tools, What a decision receipt looks like, Governance wrapper
Human-in-the-Loop — Part 1 of 2