Can I continue this Format run? A previous_run_id check in Python
A run can be continued with previous_run_id only if it has a thread_id and is completed or has artifacts. Check first, or handle four named errors.

To continue a Format run, send its id as previous_run_id. The old run needs a non-null thread_id and must be either completed or hold artifacts; otherwise the API answers with one of four named errors.
Do not send a thread id yourself: the body field is rejected as unknown_parameter, because the thread comes from the earlier run.
The four refusals
From the Create a run page (read 2026-10-03).
| Status and code | Cause | Fix |
|---|---|---|
| 404 previous_run_not_found | Unknown id, or not visible to this key | Check the id and workspace |
| 400 previous_run_format_mismatch | The run belongs to a different Format | Post to the Format that made it |
| 409 previous_run_not_terminal | The earlier run is still active | Poll until it ends, then retry |
| 400 previous_run_not_resumable | No thread, or nothing completed or produced | Start a fresh run |
The pre-check
Fetch the receipt and test it. A terminal run that is failed or canceled can still be continued if it produced artifacts, which is what makes partial assemblies recoverable.
TERMINAL = {"completed", "failed", "canceled", "skipped"}
def can_continue(run):
if run.get("thread_id") is None:
return False, "no thread"
if run["status"] not in TERMINAL:
return False, "still running"
if run["status"] == "completed" or run.get("artifacts"):
return True, "ok"
return False, "nothing to resume"
print(can_continue({"thread_id": "t", "status": "failed", "artifacts": [{}]}))
print(can_continue({"thread_id": None, "status": "completed"}))Use it with an idempotency key
Derive the key for the continuation from the previous run id and your instruction, so a retry does not branch twice. The earlier case is in continuing an incomplete assembly.
Sources
Related posts
More in Formats
- Check a Format output schema against Sume size limits first
Sume rejects schemas deeper than 10 levels, over 5000 properties or 120,000 characters. A local counter that catches max_depth and max_string_length early.
- Cinematic studio commercial Format for a holiday tech gift teaser
Use Sume's cinematic-studio-commercial Format for a macro, high-end camera-move teaser of a flagship gadget or luxury object aimed at gift season.
- Close-camera UGC for Black Friday: six hook variants in one queue
Run Sume's close-camera UGC Format as one bulk queue to test six Black Friday testimonial hooks, with the TikTok in-feed file limits to check afterward.
- Continued Format run: artifacts span the thread, usage is per run
A Sume Format run continued with previous_run_id gets a new id and cap. Its artifacts[] lists the whole conversation, while usage stays per run.
Written by Sume