Skip to main content
Once a run has been persisted, you can advance it, redo it, branch off it, or pick a specific point in its history to continue from. All five operations go through one endpoint: /continue (HTTP) or agent.continue_run() / team.continue_run() (SDK).

Operations

Why one endpoint

/continue dispatches on the body. The same call resumes a HITL-paused run, regenerates the last response, forks at message K, or continues a completed run with a follow-up. The body fields name the verb:
One code path on the server, one mental model for the caller.

The “1 run = 1 model loop” invariant

A run row in the DB represents exactly one model loop. Whenever a model loop has already finished (status COMPLETED), /continue produces a new run_id. There is no way to mix two loops’ metrics, timestamps, or events into one row. Mid-flight resumes (RUNNING / ERROR / PAUSED, where the loop never finished) stay on the same run_id. Everything else gets a new one.

Learn How To

Checkpointing

Persist mid-run state with checkpoint="tool-batch" so a crashed process can resume.

Continue Run

The unified /continue endpoint: resume HITL pauses, mid-flight errors, or completed runs with a follow-up.

Regenerate

Redo the last assistant response, optionally with steering input.

Fork a Run

Rewind to a chosen message boundary and explore an alternative path. Sibling run in the same session.

Branch a Session

Deep-copy every run into a brand-new session for independent exploration.

API Reference

HTTP endpoints, request bodies, and response shapes.

Developer Resources