sincecutoff.com
← all changes

wrangler workflows instances terminate supports rollback

Introduced 2026-07-09 · score 0.96

HOW TO USE IT

When terminating a Workflow instance and you want registered rollback handlers to run first, call `WorkflowInstance.terminate({ rollback: true })` or use Wrangler’s terminate command with `--rollback`.

let instance = await env.MY_WORKFLOW.get("<INSTANCE_ID>"); await instance.terminate({ rollback: true });
npx wrangler workflows instances terminate <WORKFLOW_NAME> <INSTANCE_ID> --rollback
npx wrangler workflows instances terminate <WORKFLOW_NAME> <INSTANCE_ID> --local --rollback

WHY THIS HELPS

Terminate a Workflow instance while running its registered rollback handlers.

REQUIREMENTS AND LIMITATIONS

  • Version: 4.109.0
  • Availability: CLI rollback support includes local mode.
  • rollback: Set to `true` to run registered rollback handlers before the instance reaches `terminated`; steps without rollback handlers are skipped.
  • --rollback: Run registered rollback handlers before terminating; default is `false`.
  • <WORKFLOW_NAME> (required): Name of the workflow.
  • <INSTANCE_ID> (required): ID of the instance; `latest` can be used instead of a UUID.
  • --local: Interact with the local dev session.
  • The rollback option is only sent for terminate operations.
  • The Local Explorer API rejects the option for pause, resume, and restart actions.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card