{
  "slug": "local-workflows-bindings-support-object-form-createbatch-9338eb8fa030",
  "title": "Local Workflows bindings support object-form createBatch()",
  "tools": [
    "wrangler"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-10-01T17:03:57.000Z",
  "announced_at": "2026-10-01T17:03:57.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When running a local Workflows binding, call object-form `createBatch()` with a count or per-instance options. Read the returned `created` handles and indexed `errors`; the array form remains supported.",
    "examples": [
      "const result = await env.<BINDING>.createBatch({ count: 2, params: <payload> });\nconst handles = result.created;\nconst errors = result.errors;",
      "const result = await env.<BINDING>.createBatch({ instances: [{ id: \"<id>\", params: <payload> }] });\nconst handles = result.created;\nconst errors = result.errors;"
    ],
    "gotchas": [
      "Version: 4.146.0",
      "count: Number of instances to create in count form; the documented source example uses `count: 2`.",
      "params: Payload passed to instances in the count-form example.",
      "instances: List of per-instance options; each may include `id` and `params`.",
      "created: Returned instance handles.",
      "errors: Returned per-instance errors include the input `index`; examples also show `id`, `code`, and `message`.",
      "Prerequisite: Local Workflows development requires Wrangler v3.89.0 or later and Node.js 18.0.0 or later; Wrangler 4.146.0 satisfies the documented Wrangler minimum.",
      "This support applies to local Workflows bindings.",
      "Docs conflict: The Workers API docs list the array-form `createBatch(batch: WorkflowInstanceCreateOptions[])` signature and array result; the Wrangler 4.146.0 release note and source commit document the new local object form. The docs do not specify object-form field requiredness."
    ]
  },
  "why_it_matters": "In local development, create Workflow instances in a batch using a count or per-instance options.",
  "sources": [
    "https://github.com/cloudflare/workers-sdk/releases/tag/wrangler%404.146.0",
    "https://github.com/cloudflare/workers-sdk/commit/464a582442ad6872edf1d52107b1a7b68b5e606f",
    "https://developers.cloudflare.com/workflows/build/local-development/"
  ],
  "rank": 0.94027,
  "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": "gap-20261007",
    "verdict_id": "gap-20261007:gap-20261007-5f0482cf6b319961-0:gate",
    "evidence_hash": "9c838c13d03585ec59d09ca7a8a311b4833f27115df49298e1699e3e96fb6595"
  },
  "review": {
    "draft_hash": "77be2d30d376d30150f378098ffdcb3c8c1c4ba85d73a80cfd58408df0361138",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "gap-20261007:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.94 >= 0.9; 2 needed) and Jev gave 0.65 (>= 0.6 needed)."
  }
}
