{
  "slug": "wrangler-workflow-bindings-configure-default-instance-retention-e83cc7f59a9e",
  "title": "Wrangler Workflow bindings configure default instance retention",
  "tools": [
    "wrangler"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-08-25T19:17:09.000Z",
  "announced_at": "2026-08-25T19:17:09.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When a Workflow’s instances need a per-Workflow retention default, add optional `default_retention` to its Wrangler `workflows` binding. Set `success_retention` and/or `error_retention` to a duration string or whole number of milliseconds; instances with their own retention keep that setting.",
    "examples": [
      "{\n  \"workflows\": [\n    {\n      \"binding\": \"<BINDING_NAME>\",\n      \"name\": \"<WORKFLOW_NAME>\",\n      \"class_name\": \"<CLASS_NAME>\",\n      \"default_retention\": {\n        \"success_retention\": \"3 days\",\n        \"error_retention\": \"7 days\"\n      }\n    }\n  ]\n}"
    ],
    "gotchas": [
      "Version: 4.126.0",
      "workflows[].binding (required): Binding name used to refer to the Workflow; must be a valid JavaScript variable name.",
      "workflows[].name (required): Name of the Workflow.",
      "workflows[].class_name (required): Exported Workflow class name; must match the class exported from the Worker.",
      "workflows[].default_retention: Default retention for instances that do not set their own retention; capped at the account retention limit.",
      "workflows[].default_retention.success_retention: Retention for successfully completed or terminated instances; accepts a duration string or whole number of milliseconds.",
      "workflows[].default_retention.error_retention: Retention for instances that end in an errored state; accepts a duration string or whole number of milliseconds.",
      "Each retention side is optional.",
      "Durations are interpreted by the Workflows API, which caps them at the account's retention limit.",
      "The per-Workflow default applies to instances that do not specify their own retention."
    ]
  },
  "why_it_matters": "Set default retention periods for instances of a Workflow in Wrangler configuration.",
  "sources": [
    "https://github.com/cloudflare/workers-sdk/releases/tag/wrangler%404.126.0",
    "https://developers.cloudflare.com/workers/wrangler/configuration/"
  ],
  "rank": 0.94031,
  "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": "regrade-20261008",
    "verdict_id": "regrade-20261008:by-tool-wrangler-20261002--item-2c4d17561d546615779d2c1b:gate",
    "evidence_hash": "21df7cbcdab7c905a0f5e7d3aebb67e39db816d2dad34735ea709f02ee414c6c"
  },
  "review": {
    "draft_hash": "c1383d4146270171de182e62077a86e1feb987ffd80e5a5e777984ec372b339f",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "regrade-20261008:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.94 >= 0.9; 2 needed) and Jev gave 0.80 (>= 0.6 needed)."
  }
}
