Container snapshot restore: resume a Sume job from its job_id
Cloudflare Containers can snapshot a running container. Save the Sume job_id in it, and after a restore read the job's status_url instead of resubmitting.

Cloudflare's changelog for Sep 30, 2026 adds the ability to create a snapshot from a running Container, restoring filesystem state after a restart or Durable Object handoff. If a Sume render is in flight when that happens, the snapshot only needs the job_id: after the restore, read the job's status_url and do not submit again.
What the changelog says
The entry reads "Create a snapshot from the running Container". The point, per the entry, is restoring filesystem state after a restart or a Durable Object handoff. The page as read does not say that running processes or memory are restored, so assume only files persist.
| Item | Detail |
|---|---|
| Date | Sep 30, 2026 |
| Entry | Create a snapshot from the running Container |
| Restores | Filesystem state after restart or Durable Object handoff |
What to write into the filesystem
A Sume job runs on Sume's side, so it does not stop when your container does. What you lose is the handle. Write a small file the moment the create call returns: the job_id, the status_url, and the Idempotency-Key you used. Sume docs say the job envelope carries status_url, result_url, events_url and cancel_url.
Write it before you start waiting, not after. A snapshot taken between submit and write would restore a container that never knew about the job.
After the restore, read, do not resubmit
On startup, look for the file. If a job is recorded, poll its status until terminal is true, honoring next_poll_after_seconds when present, then fetch the result once result_ready is true. Sume's docs say not to submit a new paid job for the same intent; if you must retry the submit itself, reuse the same Idempotency-Key.
The sketch uses pip install requests.
import json, os, time, requests
H = {"Authorization": "Bearer " + os.environ["SUME_API_KEY"]}
state = json.load(open("/data/job.json")) # {"job_id": "..."}
base = "https://api.sume.com/v1/jobs/" + state["job_id"]
while True:
s = requests.get(base + "/status", headers=H, timeout=30).json()
if s.get("terminal"):
break
time.sleep(s.get("next_poll_after_seconds") or 10)
if s.get("result_ready"):
print(requests.get(base + "/result", headers=H, timeout=30).json())
else:
print("terminal without a result:", s.get("status"))Sources
Related posts
More in Developers
- Copilot CLI dynamic workflows: let them call the Sume CLI
GitHub added dynamic workflows to Copilot CLI on Oct 1, 2026. Give it the Sume CLI skill pack and the hosted MCP endpoint, and keep paid calls behind a gate.
- createSumeClient timeout is 10 minutes per request: tune it for polls
The Sume SDK client waits up to 10 minutes on each HTTP request, so one hung status poll can stall waitForJob for 10 minutes. Use a short-timeout client.
- CrewAI conversational flows: confirm cost before a Sume render
In a CrewAI chat flow, have the step call Sume with dry_run first and ask the user to confirm the cost.
- Cursor Security Review bot on a Sume webhook handler: what to find
Cursor added a Security Review bot on Sep 23. A webhook handler for Sume should pass seven checks: raw body, timestamp window, rotation, empty secret and more.
Written by Sume