Claude Opus 5.5

wrangler-4-141-0-10-b

Claude Code's read-only tools, web search on, ludion sync off

Question

What does --durable-objects-code-update-mode do on wrangler deploy?

Answer key

A correct answer says
Deploys can choose a Durable Objects code update strategy (`--durable-objects-code-update-mode immediate` or `deferred <delay>`, or `durable_objects.code_update_strategy`); unset, it is deferred with a 5-minute maximum delay.
The stale answer
There is no option to control when running Durable Object instances pick up new code after a deploy.

The change's lesson

Answer

The flag controls when Durable Object instances that are already running switch to the new code you just deployed. It was added in wrangler 4.141.0 (PR #15658, "Add Durable Objects code update strategies to Worker deployments"), and it works with `wrangler deploy`, `wrangler versions deploy` and `wrangler rollback`.

- **Immediate mode** pushes the new code to active instances right away, without waiting for them to hibernate.
- **Deferred mode** is the default. It lets active instances keep running the old code for up to a maximum delay (for example `30s`), after which the update is applied. If you don't set anything, the delay is five minutes, and the maximum allowed is 24 hours.

You can also set this in your config file with `durable_objects.code_update_strategy`, using `mode` and `max_delay`.

I got this from release notes and search summaries rather than the CLI reference. Run `wrangler deploy --help` on your version to check the exact syntax. I also couldn't confirm whether anything changed after 4.141.0; the latest release I found was 4.149.0.

Sources:
- [Release wrangler@4.141.0 · cloudflare/workers-sdk](https://github.com/cloudflare/workers-sdk/releases/tag/wrangler%404.141.0)
- [Releases · cloudflare/workers-sdk](https://github.com/cloudflare/workers-sdk/releases)
- [Gradual deployments with Durable Objects](https://developers.cloudflare.com/workers/versions-and-deployments/gradual-deployments/with-durable-objects/)

Answering cost $0.13.

Grade

correct

The judge's reason: It describes immediate and deferred modes, the config key durable_objects.code_update_strategy, and the 5-minute default deferred delay, matching the key.

The judge's log

Session log

What the agent wrote, the tools it called, and what they returned, from docs/bench/2026-10-11-done3/runs/B-project/wrangler-4-141-0-10-b.jsonl. Thinking and the session's settings are left out. The raw log

  1. Tool call: ToolSearch

    {
      "query": "select:WebSearch",
      "max_results": 1
    }
  2. Tool output

    {"type":"tool_reference","tool_name":"WebSearch"}
  3. Tool call: WebSearch

    {
      "query": "wrangler deploy \"--durable-objects-code-update-mode\"",
      "mode": "standard"
    }
  4. Tool output

    Web search results for query: "wrangler deploy "--durable-objects-code-update-mode""
    
    Links: [{"title":"pcx_content_type | title | meta | ||","url":"https://github.com/cloudflare/cloudflare-docs/blob/production/content/workers/configuration/versions-and-deployments/gradual-deployments.md"},{"title":"Gradual deployments","url":"https://developers.cloudflare.com:2053/workers/configuration/versions-and-deployments/gradual-deployments"},{"title":"with durable objects","url":"https://developers.cloudflare.com/workers/versions-and-deployments/gradual-deployments/with-durable-objects/"},{"title":"developers.cloudflare.com","url":"https://developers.cloudflare.com/containers/platform-details/rollouts/"},{"title":"developers.cloudflare.com","url":"https://developers.cloudflare.com/workers/versions-and-deployments/gradual-deployments/with-durable-objects/index.md"},{"title":"codex-container-api-docs.previews.developers.cloudflare.com","url":"https://codex-container-api-docs.previews.developers.cloudflare.com/workers/versions-and-deployments/gradual-deployments/index.md"},{"title":"with durable objects","url":"https://codex-container-api-docs.previews.developers.cloudflare.com/workers/versions-and-deployments/gradual-deployments/with-durable-objects/"},{"title":"docs-durable-objects-instance-replaced-errors.previews.developers.cloudflare.com","url":"https://docs-durable-objects-instance-replaced-errors.previews.developers.cloudflare.com/workers/versions-and-deployments/gradual-deployments/index.md"},{"title":"f75b423c.previews.developers.cloudflare.com","url":"https://f75b423c.previews.developers.cloudflare.com/durable-objects/reference/durable-object-class-migrations-legacy/index.md"}]
    
    The search didn't turn up anything about the `--durable-objects-code-update-mode` flag itself. None of the results mention it, so I can't confirm whether it exists or what it does.
    
    The results do cover how Wrangler deploys Durable Object code in general:
    
    - **Code updates vs. migrations:** One Cloudflare doc says that editing an existing Durable Object class's code needs no migration, and that you update it by re-running `wrangler deploy` ([source](https://f75b423c.previews.developers.cloudflare.com/durable-objects/reference/durable-object-class-migrations-legacy/index.md)).
    - **Lifecycle changes under gradual deployments:** Cloudflare's gradual deployment docs say that Worker bundles changing a Durable Object's class lifecycle (creating, renaming, or deleting classes) can't be uploaded as part of a gradual rollout. They recommend running `npx wrangler deploy` for these changes and keeping them separate from other code changes ([source](https://developers.cloudflare.com/workers/versions-and-deployments/gradual-deployments/with-durable-objects/index.md)).
    - **Version assignment:** Under gradual rollouts, each Durable Object instance is pinned to one Worker version at a time, since only one version of a given object can run at once ([source](https://codex-container-api-docs.previews.developers.cloudflare.com/workers/versions-and-deployments/gradual-deployments/with-durable-objects/)).
    
    My suggestion is to check the Wrangler CLI reference or its changelog directly for that flag, since the search index didn't cover it.
    
    
    REMINDER: You MUST include the sources above in your response to the user using markdown hyperlinks.
  5. Tool call: WebSearch

    {
      "query": "wrangler \"durable-objects-code-update-mode\" workers-sdk changelog",
      "mode": "extended"
    }
  6. Tool output

    Web search results for query: "wrangler "durable-objects-code-update-mode" workers-sdk changelog"
    
    Links: [{"title":"Release wrangler@4.141.0 · cloudflare/workers-sdk","url":"https://github.com/cloudflare/workers-sdk/releases/tag/wrangler%404.141.0"},{"title":"Update dependency wrangler to v4.141.0 by renovate[bot] · Pull Request #789 · taga3s/taga3s.dev","url":"https://github.com/taga3s/taga3s.dev/pull/789"},{"title":"chore(deps): update dependency wrangler to v4.141.0 by renovate[bot] · Pull Request #35 · rashedobaid/rashedobaid.com","url":"https://github.com/rashedobaid/rashedobaid.com/pull/35"},{"title":"Bump the worker-dependencies group in /worker with 3 updates by dependabot[bot] · Pull Request #9 · OI1ver/Platform","url":"https://github.com/OI1ver/Platform/pull/9"},{"title":"wrangler-legacy/CHANGELOG.md at master · cloudflare/wrangler-legacy","url":"https://github.com/cloudflare/wrangler-legacy/blob/master/CHANGELOG.md"},{"title":"cloudflare/workers-sdk wrangler@2.0.25 on GitHub","url":"https://newreleases.io/project/github/cloudflare/workers-sdk/release/wrangler@2.0.25"},{"title":"Workers Changelog · Cloudflare Workers docs","url":"https://developers.cloudflare.com/workers/platform/changelog/"},{"title":"Workers Changelog","url":"https://developers.cloudflare.com/changelog/product/workers/5/"},{"title":"Releases · cloudflare/workers-sdk","url":"https://github.com/cloudflare/workers-sdk/releases"},{"title":"github.com","url":"https://github.com/JacobLinCool/selflare/pull/5"}]
    
    The flag was added in **wrangler 4.141.0**, a minor release that the workers-sdk release notes list as "Add Durable Objects code update strategies to Worker deployments" (PR #15658). Immediate mode can be used with deploy, versions deploy, and rollback to push code without waiting for active Durable Object instances to hibernate.
    
    Deferred mode accepts a maximum delay, such as 30s, and can also be set in config through durable_objects.code_update_strategy with mode and max_delay. If unset, the strategy defaults to deferred with a five-minute maximum delay, and delays are capped at 24 hours with millisecond precision.
    
    The 4.141.0 commit list names the same PR as a "hibernation timeout option," so the title differs from the release note wording. The search also surfaced a newer release, wrangler 4.149.0 (October 8), but its results didn't mention this flag, so I couldn't confirm whether its behavior changed after 4.141.0.
    
    
    REMINDER: You MUST include the sources above in your response to the user using markdown hyperlinks.
  7. Agent

    The flag controls when Durable Object instances that are already running switch to the new code you just deployed. It was added in wrangler 4.141.0 (PR #15658, "Add Durable Objects code update strategies to Worker deployments"), and it works with `wrangler deploy`, `wrangler versions deploy` and `wrangler rollback`.
    
    - **Immediate mode** pushes the new code to active instances right away, without waiting for them to hibernate.
    - **Deferred mode** is the default. It lets active instances keep running the old code for up to a maximum delay (for example `30s`), after which the update is applied. If you don't set anything, the delay is five minutes, and the maximum allowed is 24 hours.
    
    You can also set this in your config file with `durable_objects.code_update_strategy`, using `mode` and `max_delay`.
    
    I got this from release notes and search summaries rather than the CLI reference. Run `wrangler deploy --help` on your version to check the exact syntax. I also couldn't confirm whether anything changed after 4.141.0; the latest release I found was 4.149.0.
    
    Sources:
    - [Release wrangler@4.141.0 · cloudflare/workers-sdk](https://github.com/cloudflare/workers-sdk/releases/tag/wrangler%404.141.0)
    - [Releases · cloudflare/workers-sdk](https://github.com/cloudflare/workers-sdk/releases)
    - [Gradual deployments with Durable Objects](https://developers.cloudflare.com/workers/versions-and-deployments/gradual-deployments/with-durable-objects/)