// AI Platform Drift

Durable Objects now defer code updates by default for 5 minutes

Cloudflare developer changelog · published 2026-10-31 17:24 UTC
ACTION NEEDED VERIFY_ONLY API
WHAT CHANGEDCloudflare changed Durable Objects to defer code updates by default, effective 30 October 2026. Active objects now continue running current code for up to 300 seconds (5 minutes) after deployment, waiting to hibernate before adopting new code. Previously, code updates applied immediately, interrupting in-flight work and terminating connections. A new `code_update_strategy` configuration parameter controls the mode (deferred or immediate) and `max_delay` (0 to 86400 seconds). A new CLI flag `--durable-objects-code-update-mode` overrides the strategy for individual deployments.
WHY IT MATTERSDeployments will no longer immediately interrupt active Durable Objects. Code expecting instant updates—such as deployment tooling that calls a Durable Object immediately after deploying and requires the new code to be live—will encounter stale code for up to 5 minutes unless the configuration is changed. Objects that hibernate before the delay ends will adopt new code cleanly; those that remain active will reset when the delay expires, still interrupting work but on a delayed schedule.
WHAT TO DOReview your Durable Objects deployment workflows. If you need immediate updates during incidents or when tooling depends on new code being live right after deployment, either set `code_update_strategy.mode` to `immediate` in wrangler.toml or pass `--durable-objects-code-update-mode immediate` to individual deployments. If the 5-minute default delay does not match your workload's typical operation duration, configure `max_delay` in seconds (up to 86400) in the `code_update_strategy` block.
ACT-BY DATE PASSED — this item's act-by date, 2026-10-30, is before this page was generated 2026-11-21 (UTC). Check the primary source before acting on it.
Model-reported confidence 95% (not measured accuracy) Primary source ↗ written by anthropic/claude-sonnet-4.5
Show the reasoning — raw diff, triage verdict, confidence
RAW DIFF
+## Durable Objects, Workers - Durable Objects now defer code updates by default
+https://developers.cloudflare.com/changelog/post/2026-10-30-durable-objects-deferred-code-updates/
+Fri, 30 Oct 2026 00:00:00 GMT
+
+Durable Objects can stay active across requests, allowing you to run long-running agents, maintain long-lived WebSocket connections and coordinate state across many clients. This is possible because each Durable Object is globally unique, and this means it must run only one version of your code at a time. Previously, when you deployed a change to your Durable Objects code, that change would be applied immediately, which could interrupt in-flight work and terminate open connections.
+Durable Objects now defer code updates by default. When you deploy, an active Durable Object can keep running its current code for up to 5 minutes (300 seconds) while it waits to hibernate. This gives in-flight work time to finish. WebSocket connections that use the Hibernation API remain connected when an object adopts new code after hibernating.
+For an active Durable Object, a code update follows this flow:
+flowchart TD
+accTitle: Code updates for an active Durable Object
+accDescr: By default, an active object can keep running its current code until it hibernates or the delay ends. After hibernating, it starts on new code on the next request. If the delay ends first, or immediate mode is selected, it resets and adopts the new code. Deferral is best effort.
+A["You deploy new code"] -->|"Default: deferred"| B["The object can keep running<br/>its current code"]
+B --> C{"Hibernates before<br/>the delay ends?"}
+C -->|Yes| D["Starts on the new code<br/>on the next request"]
+C -->|No| E["The object resets<br/>and adopts the new code"]
+A -.->|"Override: immediate"| E
+
+To change the delay, add code_update_strategy to durable_objects in your Wrangler configuration:
+{
+"durable_objects": {
+"bindings": [
+{
+"name": "CHAT_ROOM",
+"class_name": "ChatRoom",
+},
+],
+"code_update_strategy": {
+"mode": "deferred",
+"max_delay": 60,
+},
+},
+}[[durable_objects.bindings]]
+name = "CHAT_ROOM"
+class_name = "ChatRoom"
+
+[durable_objects.code_update_strategy]
+mode = "deferred"
+max_delay = 60
+max_delay is in seconds, from 0 to 86400 (24 hours), with millisecond precision. Omit it to use the default of 300 seconds.
+To set the strategy for a single deployment, pass --durable-objects-code-update-mode with immediate or deferred <duration>. For example, apply an update right away during an incident, or when your deployment tooling calls a Durable Object right after deploying and needs the new code:
+npmyarnpnpmnpx wrangler versions deploy <VERSION_ID>@100% --durable-objects-code-update-mode immediateyarn wrangler versions deploy <VERSION_ID>@100% --durable-objects-code-update-mode immediatepnpm wrangler versions deploy <VERSION_ID>@100% --durable-objects-code-update-mode immediate
+A deferred code update is best effort and does not guarantee that every operation finishes. The object can still reset before max_delay is reached, for example during a Cloudflare runtime update.
+For more information, including how this interacts with gradual deployments and the REST API, refer to Durable Objects code updates.
HOW IT WAS JUDGED
Triage signals below are model-reported assertions, preserved verbatim; they are not independent arithmetic verification.
triage verdictMATERIAL at 0.95, needed 0.5
triage reasoningDefault behavior change to Durable Objects code deployment with new configuration options and execution semantics.
signalsbreaking behavior change: code updates now deferred by default instead of immediate · new configurable parameter: code_update_strategy with mode and max_delay · new CLI flag: --durable-objects-code-update-mode · new default delay: 300 seconds (5 minutes) for code update deferral · future date: 2026-10-30 indicates this is a scheduled change · execution model change: affects when deployed code takes effect on active Durable Objects
suppression—
triage modelanthropic/claude-haiku-4.5 ($0.00000)
writer modelanthropic/claude-sonnet-4.5 ($0.00000)