{
  "slug": "wrangler-workflows-instances-terminate-supports-rollback-6ecb3fdf677e",
  "title": "wrangler workflows instances terminate supports rollback",
  "tools": [
    "wrangler"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-07-09T14:09:25.000Z",
  "announced_at": "2026-07-09T14:09:25.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "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`.",
    "examples": [
      "let instance = await env.MY_WORKFLOW.get(\"<INSTANCE_ID>\");\nawait 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"
    ],
    "gotchas": [
      "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."
    ]
  },
  "why_it_matters": "Terminate a Workflow instance while running its registered rollback handlers.",
  "sources": [
    "https://github.com/cloudflare/workers-sdk/releases/tag/wrangler%404.109.0",
    "https://developers.cloudflare.com/workflows/build/workers-api/",
    "https://developers.cloudflare.com/workers/wrangler/commands/workflows/",
    "https://developers.cloudflare.com/workflows/build/trigger-workflows/"
  ],
  "rank": 0.96027,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v1+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "backfill-20261007",
    "verdict_id": "backfill-20261007:backfill-20261007-1b03e9c442931c57-1:gate",
    "evidence_hash": "85b88c12a3e981cb494e69ea3752e2f522c395eb0d853716ae4eafd18ca69e19"
  },
  "review": {
    "draft_hash": "40f17cd0f8a4cf115db7fe4dd7c7aa45054ca737993d2a5b882f9e5d429d702f",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "backfill-20261007:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.96 >= 0.9; 2 needed) and Jev gave 0.79 (>= 0.6 needed)."
  }
}
