Temporal activity cancel: Sume job_generation_already_started

When Temporal cancels an activity, a Sume job may already be generating. Cancel returns 409 job_generation_already_started; let it finish and keep the artifact.

4 min readSume
All posts

When Temporal cancels an activity that called Sume, send the cancel, but expect a 409. Sume cancels a job only before generation work starts; after that it returns 409 job_generation_already_started and the job runs to completion. Treat the 409 as "will finish" and keep the artifact.

Temporal facts are from the v1.32.0 release notes; Sume behavior is from Jobs and results, read 2026-09-30.

What did Temporal v1.32.0 change?

The release notes list "Proactive Activity Cancellation": the server can cancel activities on workers without relying on heartbeats. On workflow close (terminate, timeout, cancel, continue-as-new), cancel commands are dispatched for all in-flight activities. It sits behind the namespace-scoped setting system.enableCancelActivityWorkerCommand, default off, and does not yet support standalone activities.

What does Sume do on cancel?

Sume job cancel outcomes from the Jobs and results page, read 2026-09-30.
Job stateCancel result
Before generation startsSucceeds; job becomes canceled
Generation started409 job_generation_already_started, details.cancelable: false; job runs to completion
Already canceledIdempotent; returns the same canceled job

How should the activity handle the 409?

Call POST /v1/jobs/{id}/cancel from the cancellation handler. On success, record the job as canceled. On a 409, do not treat it as an error to retry: the job is still going to finish and bill, so record the job_id and let a webhook or later GET /v1/jobs/{id}/result collect the artifact, stored as the media.sume.com URL.

Never resubmit the paid request because the activity was canceled or timed out locally; the docs say not to. See idempotency keys for AI video APIs for safe retries.

Do I need the new Temporal setting?

No. Without it, cancellation reaches your activity the usual way, for example through heartbeats. The setting only changes how fast an activity hears about a closed workflow. The Sume side is the same either way: cancel is a best effort that can lose to a job that has already started.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume