Weekly series drop: on_active_run reject stops a second render

Set on_active_run to reject and a second episode run on the same Format answers 409 format_run_in_progress instead of starting. skip records a skipped run.

4 min readSume
All posts

Send on_active_run: "reject" on the create call and Sume will answer 409 format_run_in_progress when a run of that Format is already in flight, instead of starting a second one. For a weekly series that is the guard you want: if the Friday job fires twice, or someone clicks run while episode 9 is still rendering, the second request fails fast and costs nothing. The default is allow, which runs both at once.

The three values

on_active_run on POST /v1/formats/{handle}/{slug}/runs (read 2026-10-07)
ValueWhat happens when a run is already in flight
allow (default)The new run starts concurrently; workspace generation concurrency still applies
skipSume records a run with status skipped
rejectThe request answers 409 format_run_in_progress and no run is created

Which one for a series

Use reject for a human or script that decides to make an episode: you want to know it did not start. Use skip for an unattended schedule where a missed week is acceptable, and read the docs note that Scheduled Actions default to skip, so do not copy their bodies into API calls. Keep allow for anything that is meant to overlap, such as separate series on separate Formats.

This guard is per Format. If your season runs several Formats, one for the script, one for the video, each has its own in-flight check.

A weekly series is the textbook case for a guard because the cost of a double fire is a second full episode of generation. The check happens at create time, so a rejected call has no run and no spend, and your script can log the 409 and exit. If instead the previous episode is stuck, look at that run's status first; do not loop on the rejection.

The call

This request asks for episode 9 and refuses to overlap. Replace the handle and slug with your Format's address, and give the episode number its own Idempotency-Key so a retry returns the original run instead of a new one.

curl -sS -X POST "https://api.sume.com/v1/formats/YOUR_HANDLE/YOUR_SLUG/runs" \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: season-1-episode-9-v1" \
  -d '{
    "instruction": "Render episode 9 from the season outline.",
    "input": { "season": 1, "episode": 9 },
    "on_active_run": "reject"
  }'

Two things it does not do

First, reject and the idempotency key answer different questions. The key says 'this exact request already happened', and a replay returns the original run with idempotency_hit: true. The guard says 'another run of this Format is happening now'. Use both.

Second, a bulk queue ignores the field on its items: every child runs with allow so that the window can fill. If you want episodes to be strictly one at a time, set the queue's concurrency to 1 rather than putting reject on each item.

Cancel is the other half of the story: if an old run really is stuck, POST /v1/format-runs/{id}/cancel stops it, after which a new run is accepted. Read the run's cancelable flag before calling it.

Sources

Related posts

More in Formats

All Formats posts

Written by Sume