Skip to content

Changelog

New updates and improvements at Cloudflare.

Cloudflare CLI (cf) 1.0 release candidate

Cloudflare CLI (cf) 1.0.0-rc.1 is a release candidate for cf 1.0. cf has been in beta since late September. This is the release we recommend you try on your own projects, and we want your feedback before 1.0.

To install or update to the latest release:

npm install --global cf@latest

What is stable

We expect the following features to remain stable to cf 1.0:

  • The cloudflare.config.ts configuration format.
  • The Build Output format that cf build writes and cf deploy reads.
  • The commands that create, develop, build, and deploy projects, including cf init, cf dev, cf build, cf deploy, cf previews deploy, and cf workers versions create.
  • The large majority of commands generated from the Cloudflare API and used in the beta.

A small number of less commonly used API commands may still change before 1.0. cf generates these commands from the Cloudflare API schema, so their call path may still change before 1.0.

Upgrade from a beta

This release moves Build Output to version 1, in .cloudflare/output/v1/. cf deploy will automatically create a new build on first run in this location.

The release candidate also moves to caret (^) version ranges for its dependencies, requiring:

  • @cloudflare/vite-plugin 2.0.0-rc.0 or later, for projects that build with Vite.
  • Wrangler 4.163.0 or later, for legacy projects that build with Wrangler.

1.0.0-rc.1 renames a few generated API commands without aliases. For example, cf workers secrets bulk is now cf workers secrets bulk-edit. For the full list, refer to the release notes ↗︎.

If you last updated early in the beta, these earlier changes may also affect you:

  • Prompts, progress, and status messages are written to stderr. Stdout holds only command output, so scripts that read messages from stdout must read stderr instead.
  • Commands generated from camelCase or snake_case API names use kebab-case. For example, cf accounts billing getCredits is now cf accounts billing get-credits.
  • cf previews deploy takes the Preview name as --preview-name instead of a positional argument.
  • Commands run with --local store state in the project's .cloudflare/state directory.
  • cf no longer saves your account choice between runs. Set accountId in cloudflare.config.ts or CLOUDFLARE_ACCOUNT_ID to skip the prompt.
  • Streaming tail consumers move to experimental.streamingTailConsumers in cloudflare.config.ts.
  • Destructive commands run without a terminal exit with an error unless you pass --force.
  • cf supports the latest versions of the Node.js LTS releases and the latest active release of Node.js.

Stream live logs

cf observability tail streams live logs and other observability events as newline-delimited JSON. Select a Worker with --worker, a zone and its subdomains with --zone, or every event in the account with --all. Narrow the results with --filters, as inline JSON or from a file:

cf observability tail --worker my-worker
cf observability tail --worker my-worker --filters @filters.json

Worker events require Workers Logs to be turned on for the Worker. For filter shapes and examples, run cf observability tail --help.

What changed during the beta

Deploy

  • Deploy a directory of static assets with cf deploy ./dist. cf skips the build step and creates an assets-only Worker.
  • cf deploy --no-provision fails when a binding has no resource ID, instead of creating a new resource.
  • cf deploy --force deploys when the Worker was last deployed through the API, or when its remote configuration conflicts with your local Build Output.
  • Redeploying no longer removes secrets that you added outside cloudflare.config.ts.
  • Stack traces from deployed Workers show project paths such as src/index.ts.
  • Python Workers with vendored packages deploy correctly.
  • cf deploy applies SSH settings for Containers managed by Durable Objects.
  • cf deploy --dry-run shows the project setup changes it would make, without making them.
  • Set CLOUDFLARE_DEPENDENCIES_INSTRUMENTATION=false to stop uploading package dependency metadata with each deployment.

Develop

  • cf init creates new Worker projects with Vite+, including checks, formatting, and tests that run in the Workers runtime.
  • cf dev and cf build run the Vite or Vite+ executable installed in your project, including dependencies hoisted in a workspace.
  • cf dev passes arguments such as --port and --host to your framework's development server.
  • cf dev --profile <name> passes the selected authentication profile to your development server.
  • cf dev, cf build, and cf deploy offer to run cf migrate when they find a Wrangler configuration file.
  • On Windows, Ctrl+C exits cleanly when your framework runs through npm, Wrangler and Vite start without spawn EFTYPE errors, and cf d1 migrations create rejects names that Windows cannot store.
  • cf init approves the build scripts that pnpm 11 and later block by default, so installation succeeds.

Sign in and accounts

  • Pass --temporary-account to create a short-lived account without signing in. cf prints a URL you can use to claim the account.
  • cf auth login summarizes the scopes you granted, and cf auth scopes lists them by product.
  • cf auth whoami, also available as cf whoami, prints a short summary in a terminal and full JSON for scripts and agents.
  • cf auth login now uses the system keyring where available.
  • Long-running commands, such as cf observability tail, refresh an expired OAuth login instead of failing.
  • cf auth whoami reports the status of scoped API tokens correctly.
  • Set CLOUDFLARE_API_HEADERS to send custom headers with API requests.

API commands

  • Every command accepts --dry-run to preview what it would do and it redacts sensitive fields in request previews.
  • cf checks --body input before it asks you to sign in or confirm, and rejects array bodies larger than the API allows instead of splitting them across several requests.
  • More request fields are available as flags, including JSON objects and maps, arrays of objects, and file uploads. For example, cf pages deployments create --worker-js @./_worker.js and cf ai to-markdown --files @first.html @second.pdf.
  • Error outputs have been improved with additional messages the API returns, such as the names of missing parameters.
  • cf workers commands accept --worker to select a Worker.
  • --zone finds zones by name in accounts with many zones.
  • cf tunnels quick-start --allowed-mail limits a temporary tunnel to the email addresses and domains you allow.

Scripts and agents

  • cf --version prints only the version number.
  • Shell completions and cf tools list every flag a command accepts.
  • cf cli search has reranked cf deploy and other key commands to improve their ranking for static site and Pages deployment searches.
  • cf docs search finds Cloudflare documentation from the terminal.

Send feedback

To report a bug or tell us what is missing, open an issue in the cf repository ↗︎. For every change in each release, refer to the Cloudflare CLI release notes ↗︎.

Artifacts now supports local development

You can now develop and test Artifacts locally. Create repos, import Git repositories over HTTPS, issue repo tokens, and clone or push with Git on your machine before deploying to Cloudflare's global network. Local repos are separate from your deployed repos, so you can test changes without affecting production data.

Local repos also emit the same Artifacts events as production when a repo is created, imported, forked, or deleted, or when a repo token is created or revoked. This lets you test the Workflows that react to them before you deploy.

To use local repos when you run your Worker locally, add an Artifacts binding to your Wrangler configuration file:

{
  "$schema": "./node_modules/wrangler/config-schema.json",
  "name": "artifacts-worker",
  "main": "src/index.ts",
  // Set this to today's date
  "compatibility_date": "2026-11-18",
  "artifacts": [
    {
      "binding": "ARTIFACTS",
      "namespace": "default"
    }
  ]
}
name = "artifacts-worker"
main = "src/index.ts"
# Set this to today's date
compatibility_date = "2026-11-18"

[[artifacts]]
binding = "ARTIFACTS"
namespace = "default"

Run npx wrangler dev, then use the binding the same way you would in production:

const created = await env.ARTIFACTS.create("starter-repo");

return Response.json({
	remote: created.remote,
	token: created.token,
});
const created = await env.ARTIFACTS.create("starter-repo");

return Response.json({
	remote: created.remote,
	token: created.token,
});

The returned remote points to your local dev session, so you can use it with a standard Git client to clone and push.

Local development requires the latest version of Wrangler and Git 2.32 or later on your PATH.

When you develop with npx wrangler dev, the Cloudflare Vite plugin, or the Workers Vitest integration, Artifacts bindings use the local simulator by default. To use your deployed repos instead, set remote = true on the binding.

To learn more, refer to Local development.

Set spending limits for Workers and Durable Objects

You can now set spending limits for Workers and Durable Objects to help control unexpected usage costs, or receive email alerts while your applications keep running. Support for more products is coming soon.

Use these controls alongside AI Gateway spend limits to manage compute and AI inference costs across your application. AI Gateway supports per-user and per-model budgets for Workers AI and other AI providers, applied to requests routed through your gateway.

Workers and Durable Objects limits apply across your account for the current subscription billing period. Each product has its own spending controls.

Set your limits and alerts

In the Cloudflare dashboard ↗︎, select your account and go to Billing > Spend limits. Choose a spending limit, notification email, and alert thresholds for Workers or Durable Objects.

For example, configure a $10 Workers spending limit with email alerts at $5 and $9. To receive alerts while your applications keep running, turn off Block usage.

Workers controls with usage blocking at $10, a notification email, and alert thresholds at $5 and $9.

See when a limit takes effect

The overview shows each product's recorded spend, alert thresholds, and pause status. Email alerts notify you without stopping usage. When a spending limit takes effect, Cloudflare blocks the product's supported operations.

Spend limits overview with Workers marked Services paused and separate spend and threshold indicators for Durable Objects.

To resume usage, raise the limit above current spend, turn it off, or remove it. Usage also resumes when the next billing period starts.

Usage reporting and blocking take time, so recorded spend can exceed a limit. Read about what counts toward a limit.

Choose alerts, limits, or both

For example, set a $50 spending limit for Workers and a $20 email alert for Durable Objects:

flowchart LR
    A["Durable Objects reaches $20"] --> B["Email alert sent"]
    B --> C["Usage continues"]
    D["Workers reaches $50"] --> E["Spending limit takes effect"]
    E --> F["New Worker invocations blocked"]

Set a spending limit with the cf CLI

Install the cf CLI and select your account, then run this command to set a $50 spending limit for Workers usage in the current billing period:

cf billing spend-policies create \
  --name 'Workers $50 spending limit' \
  --product-id workers \
  --enabled true \
  --threshold-cents 5000 \
  --action usage_block

The amount is in US cents: 5000 means $50. To set a spending limit for Durable Objects, use --product-id durable_objects and update the name. Limits count usage already recorded in the current billing period.

You can also give this prompt to your coding agent. It will ask which product you want to manage and what spending limit to set, then use the CLI to configure it.

Use spending limits alongside budget alerts

The budget alerts introduced earlier this year notify you about account-wide usage costs without stopping usage. You can keep using them alongside the new product-specific spending limits and email alerts for Workers and Durable Objects.

To configure account-wide alerts, go to Billing > Billable Usage or follow the budget alerts guide.

Read the spending limits and alerts guide to learn how spending limits work and manage limits and alerts through the dashboard or cf CLI.

Send custom API headers with Wrangler and Cloudflare CLI

Wrangler 4.160.0 and Cloudflare CLI (cf) 1.0.0-beta.29 support custom headers for Cloudflare API requests. Use CLOUDFLARE_API_HEADERS to add headers or override most generated values, with the exception of protected body and transport headers.

For example, to send X-Custom-Header: value, set:

export CLOUDFLARE_API_HEADERS='{"X-Custom-Header":"value"}'

Then run your Wrangler or cf command.

For usage and restrictions, refer to the Wrangler environment variable reference and Cloudflare CLI environment variable reference.

Serve a Worker's static assets from a URL path like /blog/

You can now serve your Worker's static assets from a URL path prefix, such as example.com/blog/, without changing your build output.

Previously, to serve assets from /blog/, you had to nest your files in a matching blog directory. Now, set assets.base_path in your Wrangler configuration file, or worker.assets.basePath in cloudflare.config.ts, and keep your files at the root of your asset directory.

Use Wrangler 4.148.0 ↗︎ or later. With cloudflare.config.ts, use cf 1.0.0-beta.13 ↗︎ or later.

For example, this configuration serves your built assets from /blog/:

cloudflare.config.tsts
import { defineConfig } from "cf/config";

export default defineConfig({
worker: {
  name: "blog",
  // Set this to today's date
  compatibilityDate: "2026-11-18",
  assets: {
    basePath: "/blog",
  },
},
});
{
  "$schema": "./node_modules/wrangler/config-schema.json",
  "assets": {
    "directory": "./dist",
    "base_path": "/blog"
  }
}
[assets]
directory = "./dist"
base_path = "/blog"

Requests to /blog/ serve dist/index.html, and requests to /blog/posts/post1 serve dist/posts/post1.html. Requests outside /blog/ do not match your static assets and run your Worker, if it has one.

Paths in _headers, _redirects, and run_worker_first use the full public path, including /blog. If you build with the Cloudflare Vite plugin, also set Vite's base option to /blog/.

For more information, refer to Serving a subdirectory.

Workers Builds and Pages now list GitHub repositories based on your GitHub account

When you connect a GitHub repository to Workers Builds or Pages, the accounts and repositories you can pick from are now based on your own GitHub account, so the list reflects the repositories you work with on GitHub. Previously, the list was based on the Cloudflare Workers & Pages GitHub App installations linked to your Cloudflare account, so it could include repositories that you cannot access on GitHub.

Three developers on the same Cloudflare account have all authorized the app, and the app is installed on acme-corp and dev-1. Each sees a different repository picker. dev-1 can pick acme-corp or dev-1, with payments-api and website listed for acme-corp. dev-2 can only pick acme-corp, with only website listed. dev-3 has no accounts or repositories, only the option to add a GitHub account.

The list now shows:

  • Your own GitHub account, if the app is installed on it.
  • GitHub organizations that have the app installed, where you can access at least one repository.
  • The repositories you can access in each of them.

GitHub accounts that belong to other users are no longer listed, even if they have given you access to one of their repositories.

What this means for you:

Authorizing the app and installing it are two separate steps on GitHub. For more details, refer to Install and authorize the app for Workers Builds and Pages.

Authorize: tells Cloudflare who you are, once per person, listed under Authorized GitHub Apps. Install: decides which repositories Cloudflare can access, listed under Installed GitHub Apps.
  • If you have already authorized the app with your GitHub user: Nothing changes. You can check on the Authorized GitHub Apps page ↗︎ on GitHub.
  • If you have not: The next time you connect a repository, Cloudflare sends you to GitHub to authorize the app. You only need to do this once, even if someone else on your Cloudflare account already connected GitHub.
  • If the app is not installed on any GitHub account you can access: After you authorize, install the app on your own GitHub account or an organization, the same as before.
  • If an account or organization is missing from the list: Select Add GitHub account and install the app on it.

Projects that are already connected to a repository are not affected and keep building.

For more information, refer to Repository access for Workers Builds and Pages.

Set a concurrency limit for each Workflow

You can now set a concurrency limit on an individual Workflow to cap how many of its instances run at the same time. Use it to protect a database or third-party API that slows down or rejects requests past a certain number of concurrent connections, or to distribute load more evenly across your Workflows so that one high-volume Workflow does not use all of your account's concurrency.

For example, to allow only 10 instances of a Workflow to run at a time, set concurrency.limit on its workflows binding and redeploy:

{
	"workflows": [
		{
			"name": "my-workflow",
			"binding": "MY_WORKFLOW",
			"class_name": "MyWorkflow",
			"concurrency": {
				"limit": 10,
			},
		},
	],
}
[[workflows]]
name = "my-workflow"
binding = "MY_WORKFLOW"
class_name = "MyWorkflow"

  [workflows.concurrency]
  limit = 10

You can also set concurrency on a Workflow declared in exports, or with exports.workflow() in @cloudflare/config.

Instances above the limit are not rejected. They are queued and start automatically as running instances finish or move to the waiting state.

The limit must be a positive integer, and cannot be higher than your account's concurrency limit (100 on Workers Free, 50,000 on Workers Paid). Lowering the limit does not stop instances that are already running. Workflows without a concurrency limit can still use up to your account's full concurrency limit.

Per-Workflow concurrency limits require Wrangler 4.127.0 or above.

For more information, refer to Concurrency limits.

Run the Codex agent loop on Cloudflare Workers

Run the Codex agent loop in a Cloudflare Durable Object with this experimental Agents SDK example ↗︎. Conversations, files, and completed model and tool results persist across restarts, allowing the agent to recover after interruptions.

The example adapts Codex’s Rust turn-processing code ↗︎ to WebAssembly and uses Agents SDK capabilities for storage and recovery.

The harness combines Agents SDK capabilities for durable execution:

  • Tasks journals model calls and tool execution. Completed steps reuse their recorded results after a restart. Interrupted steps can run again.
  • Sessions stores conversation history and compacts the model context.
  • Streams stores ordered events for replay after reconnecting.
  • Workspace provides tools to read and write persistent files.

For example, use OpenAI's GPT-6.1 Sol through AI Gateway. Configure the model with createAI and install the capabilities on a Durable Object:

import { DurableObject } from "cloudflare:workers";
import { Workspace } from "@cloudflare/computer";
import { Lifecycle } from "agents/lifecycle";
import { createAI } from "agents/models/ai-sdk";
import { Sessions } from "agents/sessions";
import { Streams } from "agents/streams";
import { Tasks } from "agents/tasks";
import { CodexHarness } from "./codex-harness";

export class Coder extends DurableObject {
	tasks = new Tasks();
	streams = new Streams();
	sessions = new Sessions();
	workspace = new Workspace({ storage: this.ctx.storage });

	codex = new CodexHarness({
		tasks: this.tasks,
		streams: this.streams,
		sessions: this.sessions,
		workspace: this.workspace,
		model: createAI({ binding: this.env.AI, id: "default" })(
			"openai/gpt-6.1-sol",
		),
	});

	lifecycle = Lifecycle.install(this)
		.use(this.tasks)
		.use(this.streams)
		.use(this.sessions)
		.use(this.codex);
}
import { DurableObject } from "cloudflare:workers";
import { Workspace } from "@cloudflare/computer";
import { Lifecycle } from "agents/lifecycle";
import { createAI } from "agents/models/ai-sdk";
import { Sessions } from "agents/sessions";
import { Streams } from "agents/streams";
import { Tasks } from "agents/tasks";
import { CodexHarness } from "./codex-harness";

export class Coder extends DurableObject<Env> {
	tasks = new Tasks();
	streams = new Streams();
	sessions = new Sessions();
	workspace = new Workspace({ storage: this.ctx.storage });

	codex = new CodexHarness({
		tasks: this.tasks,
		streams: this.streams,
		sessions: this.sessions,
		workspace: this.workspace,
		model: createAI({ binding: this.env.AI, id: "default" })("openai/gpt-6.1-sol"),
	});

	lifecycle = Lifecycle.install(this)
		.use(this.tasks)
		.use(this.streams)
		.use(this.sessions)
		.use(this.codex);
}

To use this model, configure the default gateway with Unified Billing or a stored OpenAI API key.

For setup, models, tools, and recovery behavior, refer to the Codex harness guide.

Run Exo agents on Cloudflare

You can now run Exo agents on Cloudflare, with Durable Objects coordinating conversations and Cloudflare Sandboxes running Linux tools. Define an agent in Markdown, then use Exo's CLI or HTTP API to run it.

After deploying the Cloudflare adapter and configuring your Exo provider ↗︎, add an openai vault credential and save this definition as agent.md:

---
harness: basic
model:
  name: gpt-6.1-sol
  credential: openai
---

Help the user with their task.

Run the agent against your Cloudflare deployment with Exo's CLI:

exo --provider cloudflare agent run --agent-file agent.md

The Exo project maintains the Cloudflare adapter independently of Cloudflare. It does not require the Agents SDK.

Follow the Exo guide for architecture, recovery behavior, and upstream setup instructions.

Automatic retries for Durable Object calls

The runtime now retries fetch() and RPC calls to a Durable Object when they fail with a retryable error before reaching it. This applies whether the caller is a Worker or another Durable Object. Short disruptions, such as brief network interruptions, no longer need a retry loop in your code.

By default, the runtime retries a call up to four times, and starts no retry more than 10 seconds after the initial call starts. It does not retry errors thrown by your Durable Object code, or errors with .overloaded set to true.

If the connection drops and the runtime cannot tell whether the Durable Object received the call, it still retries, but the Durable Object rejects the retry if the first attempt arrived. A method never runs twice because of a retry, unless you mark it with retryable() from cloudflare:durable-objects:

src/index.jsjs
import { DurableObject } from "cloudflare:workers";
import { retryable } from "cloudflare:durable-objects";

export class Cart extends DurableObject {
	static {
		retryable(this.prototype.setQuantity);
	}
	// Idempotent: a second run sets the same quantity.
	async setQuantity(itemId, quantity) {
		await this.ctx.storage.put(itemId, quantity);
	}

	// Not retryable: a second run would add another item.
	async addOne(itemId) {
		const quantity = (await this.ctx.storage.get(itemId)) ?? 0;
		await this.ctx.storage.put(itemId, quantity + 1);
	}
}
src/index.tsts
import { DurableObject } from "cloudflare:workers";
import { retryable } from "cloudflare:durable-objects";

export class Cart extends DurableObject {
	static {
		retryable(this.prototype.setQuantity);
	}
	// Idempotent: a second run sets the same quantity.
	async setQuantity(itemId: string, quantity: number): Promise<void> {
		await this.ctx.storage.put(itemId, quantity);
	}

	// Not retryable: a second run would add another item.
	async addOne(itemId: string): Promise<void> {
		const quantity = (await this.ctx.storage.get<number>(itemId)) ?? 0;
		await this.ctx.storage.put(itemId, quantity + 1);
	}
}

To change the limits for one stub, pass a retry option to get() or getByName(). maxRetries accepts 0 to 10 retries, and timeoutMs accepts 500 to 60,000 milliseconds:

src/index.jsjs
const stub = env.CART.getByName("user-123", {
	retry: { maxRetries: 1, timeoutMs: 2000 },
});
src/index.tsts
const stub = env.CART.getByName("user-123", {
	retry: { maxRetries: 1, timeoutMs: 2000 },
});

If you already retry Durable Object calls in your own code, each of your attempts now includes the runtime's retries. Lower your own attempt count, or set maxRetries: 0 on stubs where your code handles retries.

To use retryable() and the retry option, update to Wrangler 4.158.0 or later.

For more information, refer to Automatic retries.

Count weighted requests with the Rate Limiting binding API in Workers

Requests can require different amounts of work. A product lookup might be cheap, while a search runs an expensive database query. Use weighted requests to make expensive operations consume more of the same rate limit.

The Rate Limiting binding now accepts an optional delta in limit(). Pass delta to choose how many units a call consumes.

For example, assign one unit to a product lookup and 10 units to an expensive search. Both operations consume the same user's allowance. The following handler takes a verified user ID from your application's authentication flow:

src/index.jsjs
export async function handleAuthenticatedRequest(request, env, userId) {
	const { pathname } = new URL(request.url);

	// Assign searches a weight of 10 and other requests a weight of 1.
	const delta = pathname === "/search" ? 10 : 1;

	const { success } = await env.MY_RATE_LIMITER.limit({
		key: userId,
		delta,
	});
	if (!success) {
		return new Response("Rate limit exceeded", { status: 429 });
	}

	return new Response("Success!");
}
src/index.tsts
export async function handleAuthenticatedRequest(
	request: Request,
	env: Env,
	userId: string,
): Promise<Response> {
	const { pathname } = new URL(request.url);

	// Assign searches a weight of 10 and other requests a weight of 1.
	const delta = pathname === "/search" ? 10 : 1;

	const { success } = await env.MY_RATE_LIMITER.limit({
		key: userId,
		delta,
	});
	if (!success) {
		return new Response("Rate limit exceeded", { status: 429 });
	}

	return new Response("Success!");
}

The delta defaults to 1. To use delta in local development, use Wrangler 4.157.0 ↗︎ or later. For TypeScript support, use @cloudflare/workers-types version 5.20261106.1 or later.

For more details, refer to Weighted requests.

Workers will use the new module registry by default on November 17

Starting November 17, 2026, JavaScript Workers with a compatibility date of 2026-11-17 or later will use the new module registry by default. You will no longer need the new_module_registry flag for these dates. Python Workers keep using the legacy registry.

The module registry finds and loads JavaScript modules in your Worker. We announced the new registry in September 2026 ↗︎. It improves compatibility with JavaScript standards and Node.js. In Workers using Node.js compatibility, you can use require() to load ES modules. The module and its dependencies must not use top-level await.

You can also use import.meta to get information about the current module and find the URL of another module without loading it:

src/index.jsjs
export default {
	fetch() {
		return Response.json({
			moduleUrl: import.meta.url,
			isEntrypoint: import.meta.main,
			helperUrl: import.meta.resolve("./helper.js"),
		});
	},
};
src/index.tsts
export default {
	fetch(): Response {
		return Response.json({
			moduleUrl: import.meta.url,
			isEntrypoint: import.meta.main,
			helperUrl: import.meta.resolve("./helper.js"),
		});
	},
} satisfies ExportedHandler;

When deployed with src/index.ts as the unbundled entrypoint, isEntrypoint is true. helperUrl is a URL within your Worker bundle. Resolving the URL does not check whether the module exists or load it over the network. Build tools may transform import.meta. To try this example directly, refer to unbundled deployments.

Existing Workers keep their current behavior until you change their compatibility date or flags. To try the new registry before November 17, keep your current date and add new_module_registry to your compatibility flags.

Before updating, check your dependencies for invalid import attributes and changes to require() behavior. The new registry rejects invalid import attributes. Calls to require() also fail if the module or any of its dependencies use top-level await. To keep the legacy registry with a compatibility date of 2026-11-17 or later, add legacy_module_registry.

For migration details, refer to the new module registry compatibility flag, bundling documentation, and Node.js compatibility documentation.

Request.signal will be enabled by default in Workers on November 17

Starting November 17, 2026, Workers with a compatibility date of 2026-11-17 or later will receive client disconnection events through request.signal by default. Use these events to stop unnecessary work when a client leaves. You will no longer need the enable_request_signal compatibility flag for these dates.

We introduced this feature in May 2025. You can log cancellations, clean up resources, or cancel operations that accept an AbortSignal.

For example, this Worker logs a client disconnection and cancels an outgoing request:

src/index.jsjs
export default {
	async fetch(request) {
		request.signal.addEventListener(
			"abort",
			() => {
				console.log("Client disconnected");
			},
			{ once: true },
		);

		return fetch("https://example.com/slow-response", {
			signal: request.signal,
		});
	},
};
src/index.tsts
export default {
	async fetch(request): Promise<Response> {
		request.signal.addEventListener(
			"abort",
			() => {
				console.log("Client disconnected");
			},
			{ once: true },
		);

		return fetch("https://example.com/slow-response", {
			signal: request.signal,
		});
	},
} satisfies ExportedHandler;

Existing Workers keep their current behavior until you change their compatibility date or flags. To try this feature before November 17, keep your current date and add enable_request_signal to your compatibility flags.

With a compatibility date of 2026-11-17 or later, add disable_request_signal to opt out. This change does not enable request_signal_passthrough. Pass the signal explicitly, as the example does.

For more information, refer to the Request API and the Request.signal compatibility flag.

Durable Objects now defer code updates by default

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:

npx 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.

Workers subrequests now preserve context for BYOIP destinations

Cloudflare now preserves Workers context when a subrequest targets a Cloudflare-proxied hostname using Bring Your Own IP (BYOIP). These requests are identified as Cloudflare-to-Cloudflare traffic instead of external Internet traffic.

Previously, some BYOIP subrequests could lose Workers context and original client signals. This could cause security rules to behave unexpectedly, Bot Management to evaluate an internal Cloudflare connection instead of the original client, or affected requests to return false 403 responses.

Workers subrequests to BYOIP destinations now preserve the CF-Worker header and cf.worker.upstream_zone field. This supports consistent security rule evaluation across same-zone and cross-zone subrequests.

Bot Management fields on the destination zone now represent the original end-user connection for affected BYOIP subrequests. Bot scores, verified bot status, and JA3/JA4 fingerprints no longer represent the internal connection between Cloudflare services.

Because Cloudflare-proxied BYOIP destinations now follow standard Workers subrequest handling, cross-zone requests set CF-Connecting-IP to the Workers client IP address 2a06:98c0:3600::103 for security reasons. This applies when a Worker in one Cloudflare zone sends a subrequest to a hostname in another Cloudflare zone. Same-zone subrequests continue to reflect the client IP through CF-Connecting-IP.

For more information, refer to Cloudflare BYOIP, Workers subrequests, and CF-Connecting-IP in Worker subrequests.

Workers Builds now retains builds and build logs for 90 days

Workers Builds now retains each build and its build logs for 90 days after the build finishes. You can find them under View build history in your Worker's Deployments tab, or through the Workers Builds API.

After 90 days, a build and its logs are removed. The versions and deployments it created stay in your Worker's version history, so you can still roll back to them.

If you need a build's logs for longer, you can download them with the Get build logs API endpoint.

For more information, refer to the Workers Builds limits documentation.

Restrict Workflows to a jurisdiction

You can now restrict a Workflow to a jurisdiction. Its instances only run and store data within that jurisdiction, which helps you comply with data localization regulations such as GDPR ↗︎ or FedRAMP ↗︎.

Set jurisdiction on a workflows binding, or on a Workflow declared in exports:

{
	"workflows": [
		{
			"name": "my-workflow",
			"binding": "MY_WORKFLOW",
			"class_name": "MyWorkflow",
			"jurisdiction": "eu",
		},
	],
}
[[workflows]]
name = "my-workflow"
binding = "MY_WORKFLOW"
class_name = "MyWorkflow"
jurisdiction = "eu"

The supported jurisdictions are eu (the European Union), us (the United States), and fedramp (FedRAMP-Moderate data centers).

A Workflow's jurisdiction is set when the Workflow is created, and cannot be changed afterwards. If an existing Workflow has a different jurisdiction, wrangler deploy and wrangler versions upload stop before uploading your Worker.

Workflow jurisdictions require Wrangler 4.152.0 or above.

For more information, refer to Data location.

Cloudflare Computer now helps agents recover from interruptions and wait for approval

@cloudflare/computer ↗︎ gives your agent a workspace to run code in. From v0.7.0, that code can resume after a deploy or crash, and pause on an external action, for example to approve a tool call.

Resume interrupted runs

Set onInterrupt: "replay" on WorkerJavaScriptBackend, or on a single run.

import { DurableObject } from "cloudflare:workers";
import { Workspace } from "@cloudflare/computer";
import { WorkerJavaScriptBackend } from "@cloudflare/computer/backends/worker-javascript";

export class MyAgent extends DurableObject {
	workspace = new Workspace({
		storage: this.ctx.storage,
		backends: [
			new WorkerJavaScriptBackend({
				loader: this.env.LOADER,
				onInterrupt: "replay",
			}),
		],
	});
}
import { DurableObject } from "cloudflare:workers";
import { Workspace } from "@cloudflare/computer";
import { WorkerJavaScriptBackend } from "@cloudflare/computer/backends/worker-javascript";

export class MyAgent extends DurableObject<Env> {
	workspace = new Workspace({
		storage: this.ctx.storage,
		backends: [
			new WorkerJavaScriptBackend({
				loader: this.env.LOADER,
				onInterrupt: "replay",
			}),
		],
	});
}

When recovery is triggered, the JavaScript runs again from the beginning, reusing recorded results for completed calls without printing previously recorded output again. If a call's result was not recorded before the interruption, recovery may repeat the call — even if its action already succeeded. For retry handling, including unsafeToRepeat() for operations that cannot safely repeat, refer to Calls that must not run twice.

Recovery starts on the next call to workspace.runtime. To recover without waiting for traffic, call workspace.runtime.recover() from a Durable Object alarm.

Wait for approvals

A run pauses at an approval gate, then resumes when approved or fails when rejected

Expose your application functions through custom modules. A function can call ctx.interrupt() to pause the run until your application supplies an approval decision.

Require approval before posting a comment

For example, to provide a GitHub module that allows an agent to post a comment on an issue with approval, an implementation of postComment could look like this:

new WorkerJavaScriptBackend({
	loader: this.env.LOADER,
	onInterrupt: "replay",
	modules: {
		// The agent's code imports this with `import { postComment } from "ws:github"`.
		"ws:github": {
			postComment: async ([issue, body], ctx) => {
				const { approved } = await ctx.interrupt({
					issue,
					body,
				});
				if (!approved) throw new Error("The comment was rejected.");
				return github.comment(issue, body, { idempotencyKey: ctx.callId });
			},
		},
	},
});
new WorkerJavaScriptBackend({
	loader: this.env.LOADER,
	onInterrupt: "replay",
	modules: {
		// The agent's code imports this with `import { postComment } from "ws:github"`.
		"ws:github": {
			postComment: async ([issue, body], ctx) => {
				const { approved } = await ctx.interrupt<{ approved: boolean }>({
					issue,
					body,
				});
				if (!approved) throw new Error("The comment was rejected.");
				return github.comment(issue, body, { idempotencyKey: ctx.callId });
			},
		},
	},
});

Call it from agent code

When the agent's code calls postComment(), the run pauses at ctx.interrupt() until your app responds. The agent's code calls it like any other function:

import { postComment } from "ws:github";

export default async function ({ issue }) {
	return postComment(issue, "Hello world");
}

Respond to the approval request

The time spent waiting does not count toward its timeout. The wait also survives deploys. Fetch the pending calls with workspace.runtime.pending() and resolve them with respond():

for (const call of await workspace.runtime.pending()) {
	await workspace.runtime.respond(call.id, call.callId, { approved: true });
}
for (const call of await workspace.runtime.pending()) {
	await workspace.runtime.respond(call.id, call.callId, { approved: true });
}

The run continues once all pending calls are resolved.

For setup, current limitations, and how replay works, refer to Resume runs after a restart.

Workers tracing — new spanContext(), setStatus(), and updateName() APIs

Custom spans in Workers now support three more methods from the OpenTelemetry span API.

  • span.spanContext() returns the span's traceId, spanId, and traceFlags. The IDs match the trace and span IDs in Workers Observability and in exported traces, so you can log them or return them to clients to correlate a request with its trace.
  • span.setStatus(status) sets the span status to "unset", "ok", or "error", with an optional message for errors. Span status is included in traces exported to OpenTelemetry destinations. The Workers Observability dashboard does not display it yet.
  • span.updateName(name) renames a span after it starts, such as once you know which route a request matched. You can also rename the invocation's root span returned by tracing.getActiveSpan().
src/index.jsjs
import { tracing } from "cloudflare:workers";

export default {
	async fetch(request, env) {
		const root = tracing.getActiveSpan();
		const route = router.match(request);
		root?.updateName(`${request.method} ${route.pattern}`);

		return tracing.startActiveSpan("handle", async (span) => {
			try {
				const response = await route.handler(request, env);
				span.setStatus({ code: "ok" });
				return response;
			} catch (err) {
				span.recordException(err);
				span.setStatus({ code: "error", message: "Route handler failed" });
				return Response.json(
					{ error: "Internal error", traceId: root?.spanContext().traceId },
					{ status: 500 },
				);
			} finally {
				span.end();
			}
		});
	},
};
src/index.tsts
import { tracing } from "cloudflare:workers";

export default {
	async fetch(request: Request, env: Env): Promise<Response> {
		const root = tracing.getActiveSpan();
		const route = router.match(request);
		root?.updateName(`${request.method} ${route.pattern}`);

		return tracing.startActiveSpan("handle", async (span) => {
			try {
				const response = await route.handler(request, env);
				span.setStatus({ code: "ok" });
				return response;
			} catch (err) {
				span.recordException(err as Error);
				span.setStatus({ code: "error", message: "Route handler failed" });
				return Response.json(
					{ error: "Internal error", traceId: root?.spanContext().traceId },
					{ status: 500 },
				);
			} finally {
				span.end();
			}
		});
	},
};

For more details, refer to the custom spans documentation.

Workers Builds and Pages build images reject compromised eMudhra certificates

The private keys of eight eMudhra intermediate certificate authorities ↗︎ can be recovered, so anyone can forge a certificate for any hostname that chains to them. The Workers Builds and Pages build images now reject these certificates when your build clones your repository, installs dependencies, or makes HTTPS requests.

The updated images include patched CA certificates, Node.js 22.23.4 and 24.22.1, Bun 1.4.4, and pip 26.2.2. Build commands also run with environment variables that point older runtimes at the patched CA certificates.

What you need to do

Most projects need no changes. Update your project if:

  • You set BUN_VERSION below 1.4.4. Older Bun versions trust the compromised certificates.
  • You set your own SSL_CERT_FILE, PIP_CERT, or REQUESTS_CA_BUNDLE, or set --use-bundled-ca in NODE_OPTIONS. Make sure your CA certificates do not trust the compromised intermediates.
  • Your build installs tools that ship their own CA certificates. Update them to a version that removes the compromised intermediates.

For details, refer to the build image documentation for Workers Builds and Pages.

Pin your npm version in Workers Builds with packageManager

You can now choose the npm version that Workers Builds uses by setting the packageManager field in your package.json. Before the build installs dependencies, it installs the npm version you set, so a lockfile written by a newer npm version installs the same way in your build as it does locally.

package.jsonjson
{
	"packageManager": "npm@11.19.1"
}

The packageManager field also sets the version of Yarn, pnpm, and Bun. Use an exact version, such as npm@11.19.1, not a range. Workers Builds does not use the engines.npm field to choose an npm version.

For more information, refer to Package manager versions.

Think agents now use a @cloudflare/computer workspace

Think and Agent Skills now use the workspace from @cloudflare/computer ↗︎ as well as the filesystem tools. A JavaScript execution environment can be configured by adding the WorkerJavaScriptBackend.

@cloudflare/shell is deprecated, and so is Think's createExecuteTool. These will no longer be developed nor supported from today onwards.

import { Think } from "@cloudflare/think";
import { Workspace } from "@cloudflare/computer";
import { WorkerJavaScriptBackend } from "@cloudflare/computer/backends/worker-javascript";

export class MyAgent extends Think {
	workspace = new Workspace({
		storage: this.ctx.storage,
		backends: [
			new WorkerJavaScriptBackend({ id: "js", loader: this.env.LOADER }),
		],
	});
}
import { Think } from "@cloudflare/think";
import { Workspace } from "@cloudflare/computer";
import { WorkerJavaScriptBackend } from "@cloudflare/computer/backends/worker-javascript";

export class MyAgent extends Think<Env> {
	override workspace = new Workspace({
		storage: this.ctx.storage,
		backends: [
			new WorkerJavaScriptBackend({ id: "js", loader: this.env.LOADER }),
		],
	});
}

Migrate your workspace data

This is a breaking change. @cloudflare/computer stores files in different tables from @cloudflare/shell, and there is no automatic data migration between workspace formats. To keep an existing workspace, copy its files with the script in Migrating from @cloudflare/shell to @cloudflare/computer ↗︎. Otherwise your agent will start with an empty workspace, though the original data will still be present in the existing tables.

For more information, refer to Think tools.

Wrangler and cf now upload source maps by default

From Wrangler 4.150.0, wrangler deploy, wrangler versions upload, and wrangler preview generate and upload source maps by default. You no longer need to set upload_source_maps to get stack traces with your original file names and line numbers.

cf deploy also uploads source maps by default. With the Cloudflare Vite plugin 1.64.0 or later, Worker builds generate source maps by default, and cf deploy uploads every source map in the build output.

Stack Trace with Source Map remapping

Remapped stack traces show up in Workers Logs, real-time logs, Tail Workers, and Workers Issues. Source maps are applied after your Worker runs, so they don't affect CPU time, bundle size, or cold starts.

If your Worker uses a custom build, Wrangler uploads any external source maps it finds. Maps it can't resolve, such as inline data: source maps, are skipped instead of failing the upload. Set upload_source_maps to true if you'd prefer the upload to fail.

To opt out with Wrangler, set upload_source_maps to false:

{
	"upload_source_maps": false
}
upload_source_maps = false

To opt out with cf or the Cloudflare Vite plugin, set build.sourcemap to false for your Worker's Vite environment. Refer to Disable source maps.

Test Cron Triggers with Local Explorer

Local Explorer can now send one-off Cron Trigger invocations to a Worker's scheduled() handler during local development. This removes the need to construct request URLs when testing handler behavior.

Start your local development server with cf dev, wrangler dev, or the Cloudflare Vite plugin. Open /cdn-cgi/local/explorer on the server URL and select Cron Triggers.

The browser interface supports the following tasks:

  • Invoke configured cron expressions
  • Build ad hoc expressions
  • Set reusable scheduled times
  • Inspect outcomes and noRetry() status

Ad hoc triggers and scheduled time presets stay in your browser. They do not change cloudflare.config.ts, your Wrangler configuration, or deployed Cron Triggers. Local development does not run cron schedules automatically.

Full logs and traces are available in the development session that owns the Worker when that session has Observability turned on.

The following example uses port 8787. Replace it with your development server port, such as 5173 for Vite.

The Local Explorer API exposes the same operation for tools and AI agents. The request targets an exact Worker name and accepts a cron expression and optional scheduled time:

curl -X POST \
  "http://localhost:8787/cdn-cgi/local/explorer/api/local/scheduled?worker=my-worker" \
  -H "Content-Type: application/json" \
  --data '{"cron":"0 * * * *","scheduled_time":1745856238000}'

For more details, refer to Test Cron Triggers with Local Explorer.

Search Cloudflare documentation with the Cloudflare CLI

Cloudflare CLI 1.0.0-beta.16 includes cf docs search, so you and your coding agent can find Cloudflare documentation without leaving the terminal. Search for guides, tutorials, and examples across Cloudflare products.

To install or update to the latest release:

npm install --global cf@latest

Describe what you want to do, or ask a question:

cf docs search "proxy a DNS record"
cf docs search "rate limit requests with WAF"
cf docs search "schedule a worker"

The command searches live Cloudflare documentation and returns up to five ranked JSON results. Each result includes a title, description, and documentation URL. An Internet connection is required.

Terminal demo of Cloudflare CLI beta-16 searching DNS and WAF documentation

Agents can parse the results and fetch a complete page as Markdown. For example, use jq to select the first result, then request its URL with the Accept: text/markdown header:

url=$(cf docs search "proxy a DNS record" | jq -r '.[0].url')
curl -H "Accept: text/markdown" "$url"

This release also standardizes generated command names to kebab-case. For example, cf accounts billing getCredits becomes cf accounts billing get-credits. For the full list of breaking command and flag changes, refer to the Cloudflare CLI release notes ↗︎.

For more information, refer to Find Cloudflare documentation with a coding agent.