---
name: Developer Platform Changelog
slug: cloudflare-developer-platform
type: feed
source_url: https://developers.cloudflare.com/changelog/?area=developer-platform
organization: Cloudflare
organization_slug: cloudflare
total_releases: 200
latest_date: 2026-06-19
last_updated: 2026-06-19
tracking_since: 2025-11-21
canonical: https://releases.sh/cloudflare/cloudflare-developer-platform
organization_url: https://releases.sh/cloudflare
---

<Release date="June 19, 2026" published="2026-06-19T00:00:00.000Z" url="https://developers.cloudflare.com/changelog/post/2026-06-19-temporary-accounts-for-agents/">
## Workers - Temporary accounts for AI agent deployments

AI agents can now deploy Workers to Cloudflare without first requiring a user to sign up, open a browser-based OAuth flow, click through the dashboard, or create an API token. When an agent tries to deploy without Cloudflare credentials, Wrangler can tell it to rerun with `--temporary`, then deploy the Worker to a temporary preview account.

To try this with your agent, update to Wrangler 4.102.0 or later, make sure you are logged out (`wrangler logout`), and then ask your agent to build something and deploy it to Cloudflare. The agent should follow Wrangler's output and deploy using the `--temporary` flag.

![Diagram showing an AI agent deploying, verifying, and redeploying a Worker to a temporary account, then claiming it after authentication and moving it to a permanent account](https://developers.cloudflare.com/_astro/claim-deployments-flow.Co0tUHG4_g1dGj.webp)

```sh
<div><div><span>wrangler</span><span> </span><span>deploy</span><span> </span><span>--temporary</span></div></div>
```

The temporary deployment stays live for 60 minutes. During that window, the agent can verify the Worker, redeploy changes, and return both the live Worker URL and claim URL. Opening the claim URL lets you sign in to or create a Cloudflare account and make the temporary account permanent.

Temporary preview accounts currently support a limited set of products, including Workers, Workers Static Assets, Workers KV, D1, Durable Objects, Hyperdrive, Queues, and SSL/TLS certificates. For supported products, limits, and claim behavior, refer to [Claim deployments (temporary accounts)](https://developers.cloudflare.com/workers/platform/claim-deployments/).

For more context, refer to [Temporary Cloudflare Accounts for Agents](https://blog.cloudflare.com/temporary-accounts/).
</Release>

<Release date="June 19, 2026" published="2026-06-19T00:00:00.000Z" url="https://developers.cloudflare.com/changelog/post/2026-06-19-outbound-connections-keep-dos-alive/">
## Durable Objects - Outbound connections keep Durable Objects alive

Durable Objects now remain alive for the duration of active outbound connections created via [`connect()`](https://developers.cloudflare.com/workers/runtime-apis/tcp-sockets/) or an outbound WebSocket. Previously, a Durable Object would be evicted after 70-140 seconds of no incoming traffic, even if the object had an open outbound connection, which is a common pattern when streaming responses from a large language model (LLM) over TCP or an outbound WebSocket.

With this change, each active outbound connection prevents eviction. Once all outbound connections close, the standard 70-140 second inactivity window applies before the Durable Object is evicted.

#### Before: streaming connections were cut off by eviction

![Timeline showing a Durable Object evicted 70-140 seconds after the last incoming request, cutting off an in-flight LLM stream while the outbound connection is still open](https://developers.cloudflare.com/_astro/outbound-connection-before.DpePflZI_1djzQi.svg)

#### After: active outbound connections keep the Durable Object alive

![Timeline showing the same outbound stream completing because the active connection keeps the Durable Object alive, with the inactivity window starting only after the connection closes](https://developers.cloudflare.com/_astro/outbound-connection-after.Bn9BVcYz_1djzQi.svg)

If you are [building agents on Cloudflare](https://developers.cloudflare.com/agents/), this is especially relevant. An agent that streams tokens from an LLM while [calling models](https://developers.cloudflare.com/agents/concepts/calling-llms/), or that performs [long-running tasks](https://developers.cloudflare.com/agents/concepts/agentic-patterns/long-running-agents/) over an outbound connection, now stays alive for the duration of that connection instead of being evicted mid-stream.

This applies to outbound TCP sockets (`connect()`) and outbound WebSockets, including a `fetch()` request upgraded to a WebSocket via `Upgrade: websocket`. Plain `fetch()` subrequests do not keep a Durable Object alive, even while the response body is still streaming. For example, streaming responses from LLM APIs called over HTTPS are not covered. This also does not apply to connections made through bindings such as Hyperdrive.

**Limits:**

- Each outbound connection keeps the Durable Object alive for a maximum of **15 minutes**. After 15 minutes, the connection stops preventing eviction (the connection itself continues operating), and the [standard eviction rules](https://developers.cloudflare.com/durable-objects/concepts/durable-object-lifecycle/) resume.
- The Durable Object's existing [per-account instance limits](https://developers.cloudflare.com/durable-objects/platform/limits/) still apply.

For more information, refer to [Lifecycle of a Durable Object](https://developers.cloudflare.com/durable-objects/concepts/durable-object-lifecycle/).
</Release>

<Release date="June 19, 2026" published="2026-06-19T00:00:00.000Z" url="https://developers.cloudflare.com/changelog/post/2026-06-19-apac-ne-apac-se-location-hints/">
## Durable Objects, Workers - New Asia-Pacific location hints: apac-ne and apac-se

Durable Objects now supports two new location hints for Asia-Pacific: `apac-ne` (Northeast Asia-Pacific) and `apac-se` (Southeast Asia-Pacific). Use `apac-ne` or `apac-se` when you want finer-grained placement within Asia-Pacific rather than the broader `apac` hint.

Use the new hints the same way as any other `locationHint`:

```js
<div><div><span>// Northeast Asia-Pacific (Japan, Korea, etc.)</span></div></div><div><div><span>const</span><span> </span><span>stubNE</span><span> </span><span>=</span><span> </span><span>env</span><span>.</span><span>MY_DURABLE_OBJECT</span><span>.</span><span>get</span><span>(</span><span>id</span><span>,</span><span> </span><span>{</span><span> locationHint</span><span>:</span><span> </span><span>"apac-ne"</span><span> </span><span>}</span><span>)</span><span>;</span></div></div><div><div>
</div></div><div><div><span>// Southeast Asia-Pacific (Singapore, Indonesia, etc.)</span></div></div><div><div><span>const</span><span> </span><span>stubSE</span><span> </span><span>=</span><span> </span><span>env</span><span>.</span><span>MY_DURABLE_OBJECT</span><span>.</span><span>get</span><span>(</span><span>id</span><span>,</span><span> </span><span>{</span><span> locationHint</span><span>:</span><span> </span><span>"apac-se"</span><span> </span><span>}</span><span>)</span><span>;</span></div></div>
```

If your users are spread across all of Asia-Pacific, the existing `apac` hint remains the right choice. Only reach for `apac-ne` or `apac-se` when your traffic is clearly concentrated in one sub-region and you want to minimize round-trip time to that audience. The default behavior and what we generally recommended is not adding a location hint unless absolutely needed, this will create the Durable Object as close to the initializing request as possible to reduce latency.

As with all location hints, these are best-effort suggestions. Cloudflare will place the Durable Object in a nearby data center, not necessarily the exact hinted location.

For the full list of supported hints, refer to [Data location — Provide a location hint](https://developers.cloudflare.com/durable-objects/reference/data-location/#provide-a-location-hint).
</Release>

<Release date="June 18, 2026" published="2026-06-18T00:00:00.000Z" url="https://developers.cloudflare.com/changelog/post/2026-06-18-planetscale-databases-cloudflare-billing/">
## Hyperdrive, Workers - Create PlanetScale Postgres and MySQL databases, billed to your Cloudflare account

You can create PlanetScale Postgres and MySQL databases from Cloudflare and bill PlanetScale database usage through your Cloudflare account as a pay-as-you-go customer. Cloudflare contract customers will be able to add PlanetScale usage to their contract in July so reach out to your Cloudflare account team if interested.

Create a PlanetScale database from the Cloudflare dashboard to check out globally distirbuted Workers optimized for regional data access.

[Go to **Create a PlanetScale database**](https://dash.cloudflare.com/?to=/:account/workers/hyperdrive?modal=1&type=planetscale&step=1) ![Request flow from a user to Workers, Hyperdrive caches, connection pools, and PlanetScale.](https://developers.cloudflare.com/_astro/planetscale-request-flow.CchJ2m4p_1fTg6l.svg)

PlanetScale databases created from Cloudflare work with [Workers](https://developers.cloudflare.com/workers/) through [Hyperdrive](https://developers.cloudflare.com/hyperdrive/). Hyperdrive manages database connection pools and query caching, so you can use PlanetScale as a centralized relational database for Workers applications without changing your database drivers, object-relational mapping (ORM) libraries, or SQL tooling.

PlanetScale usage appears on your Cloudflare invoice each billing period as a dollar total at PlanetScale's standard [pricing](https://planetscale.com/pricing). You can introspect per-database billing usage via PlanetScale's [dashboard](https://planetscale.com/docs/billing#organization-usage-and-billing-page).

When you create a PlanetScale database from the Cloudflare dashboard, you receive the same PlanetScale developer experience, including development branches, query insights, and Model Context Protocol (MCP) server support for agents.

To get started, refer to [PlanetScale Postgres and MySQL with Hyperdrive](https://developers.cloudflare.com/hyperdrive/planetscale/).
</Release>

<Release date="June 17, 2026" published="2026-06-17T12:00:00.000Z" url="https://developers.cloudflare.com/changelog/post/2026-06-17-dashboard-management/">
## Artifacts - Manage Artifacts from the Cloudflare dashboard

You can now configure [Artifacts](https://developers.cloudflare.com/artifacts/concepts/how-artifacts-works/) namespaces, repos, and tokens directly from the Cloudflare dashboard.

Artifacts is Git-compatible storage that lets you store repos on Cloudflare and interact with them using standard Git workflows.

You can view and create [namespaces](https://developers.cloudflare.com/artifacts/concepts/namespaces/#use-namespaces-as-containers), which are top-level containers for repos:

![Artifacts namespaces dashboard showing namespace search and create namespace controls](https://developers.cloudflare.com/_astro/dashboard-namespaces.0BJelWZh_Z1uJ1iD.webp)

You can view, create, fork, and search repos within a namespace:

![Artifacts repositories dashboard showing repo source, access, and created columns](https://developers.cloudflare.com/_astro/dashboard-repositories.M9P9JUL__Agf9h.webp)

You can open a repo to view its files and copy its Git remote URL.

![Artifacts repository overview showing files, commits, token management, and quick actions](https://developers.cloudflare.com/_astro/dashboard-repo-overview.CSHxrCW2_81obq.webp)

You can also provision tokens directly from the dashboard to scope Git access to a single repo, with read tokens for clone, fetch, and pull workflows, or write tokens when a client needs to push changes.

To get started, go to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select **Storage & databases** > **Artifacts**.

If you are enrolled in the Artifacts beta, you can use the dashboard to set up Artifacts. If you would like to join the beta, complete the [request form](https://forms.gle/DwBoPRa3CWQ8ajFp7).
</Release>

<Release version="5.2" date="June 16, 2026" published="2026-06-16T00:00:00.000Z" url="https://developers.cloudflare.com/changelog/post/2026-06-16-glm-52-workers-ai/">
## Workers, Agents, Workers AI - Introducing GLM-5.2 on Workers AI

We are excited to announce **GLM-5.2** on Workers AI, Z.ai's flagship agentic coding model.

[`@cf/zai-org/glm-5.2`](https://developers.cloudflare.com/workers-ai/models/glm-5.2/) is a text generation model built for agentic coding workflows. With function calling and reasoning support, it can handle long codebases, multi-step planning, and tool-augmented agents.

**Key features and use cases:**

- **Agentic coding**: Designed for autonomous coding tasks, long-horizon planning, and complex software engineering workflows
- **Large context window**: GLM-5.2 supports up to a 1,048,576 token context window. Workers AI is launching the model with a 262,144 token context window and plans to increase this in the future
- **Function calling**: Build agents that invoke tools and APIs across multiple conversation turns
- **Reasoning**: Tackles complex problem-solving and step-by-step reasoning tasks

Use GLM-5.2 through the [Workers AI binding](https://developers.cloudflare.com/workers-ai/configuration/bindings/) (`env.AI.run()`), the REST API at `/run` or `/v1/chat/completions`, or [AI Gateway](https://developers.cloudflare.com/ai-gateway/).

Pricing is available on the [model page](https://developers.cloudflare.com/workers-ai/models/glm-5.2/) or [pricing page](https://developers.cloudflare.com/workers-ai/platform/pricing/).
</Release>

<Release date="June 16, 2026" published="2026-06-16T00:00:00.000Z" url="https://developers.cloudflare.com/changelog/post/2026-06-16-tcp-connect-vpc-networks/">
## Workers VPC - TCP connections via connect() over VPC Networks

[VPC Network](https://developers.cloudflare.com/workers-vpc/configuration/vpc-networks/) bindings now support the [`connect()`](https://developers.cloudflare.com/workers/runtime-apis/tcp-sockets/) Socket API for raw TCP connections to private destinations, in addition to HTTP traffic via `fetch()`.

This means Workers can now open TCP sockets to any private service reachable through the bound Cloudflare Tunnel, Cloudflare Mesh, or Cloudflare WAN on-ramp — Redis, Memcached, MQTT, custom binary protocols, or any other TCP-based service.

- wrangler.jsonc
    
    ```jsonc
    <div><div><span>{</span></div></div><div><div><span>  </span><span>"</span><span>$schema</span><span>"</span><span>:</span><span> </span><span>"./node_modules/wrangler/config-schema.json"</span><span>,</span></div></div><div><div><span>  </span><span>"</span><span>vpc_networks</span><span>"</span><span>:</span><span> </span><span>[</span></div></div><div><div><span>    </span><span>{</span></div></div><div><div><span>      </span><span>"</span><span>binding</span><span>"</span><span>:</span><span> </span><span>"PRIVATE_NETWORK"</span><span>,</span></div></div><div><div><span>      </span><span>"</span><span>network_id</span><span>"</span><span>:</span><span> </span><span>"cf1:network"</span><span>,</span></div></div><div><div><span>      </span><span>"</span><span>remote</span><span>"</span><span>:</span><span> </span><span>true</span></div></div><div><div><span>    </span><span>}</span></div></div><div><div><span>  </span><span>]</span></div></div><div><div><span>}</span></div></div>
    ```
    
- wrangler.toml
    
    ```toml
    <div><div><span>[[</span><span>vpc_networks</span><span>]]</span></div></div><div><div><span>binding</span><span> </span><span>=</span><span> </span><span>"PRIVATE_NETWORK"</span></div></div><div><div><span>network_id</span><span> </span><span>=</span><span> </span><span>"cf1:network"</span></div></div><div><div><span>remote</span><span> </span><span>=</span><span> </span><span>true</span></div></div>
    ```
    

At runtime, use `connect()` on the binding to open a TCP socket to a private destination:

```ts
<div><div><span>export</span><span> </span><span>default</span><span> </span><span>{</span></div></div><div><div><span>  </span><span>async</span><span> </span><span>fetch</span><span>(</span><span>request</span><span>:</span><span> </span><span>Request</span><span>,</span><span> </span><span>env</span><span>:</span><span> </span><span>Env</span><span>)</span><span> </span><span>{</span></div></div><div><div><span>    </span><span>// Open a TCP connection to a private Redis instance</span></div></div><div><div><span>    </span><span>const</span><span> </span><span>socket</span><span> </span><span>=</span><span> </span><span>await</span><span> </span><span>env</span><span>.</span><span>PRIVATE_NETWORK</span><span>.</span><span>connect</span><span>(</span><span>"10.0.1.50:6379"</span><span>)</span><span>;</span></div></div><div><div>
</div></div><div><div><span>    </span><span>// Write a Redis PING command</span></div></div><div><div><span>    </span><span>const</span><span> </span><span>writer</span><span> </span><span>=</span><span> </span><span>socket</span><span>.</span><span>writable</span><span>.</span><span>getWriter</span><span>()</span><span>;</span></div></div><div><div><span>    </span><span>await</span><span> </span><span>writer</span><span>.</span><span>write</span><span>(</span><span>new</span><span> </span><span>TextEncoder</span><span>()</span><span>.</span><span>encode</span><span>(</span><span>"PING</span><span>\r\n</span><span>"</span><span>))</span><span>;</span></div></div><div><div><span>    </span><span>await</span><span> </span><span>writer</span><span>.</span><span>close</span><span>()</span><span>;</span></div></div><div><div>
</div></div><div><div><span>    </span><span>return</span><span> </span><span>new</span><span> </span><span>Response</span><span>(</span><span>socket</span><span>.</span><span>readable</span><span>)</span><span>;</span></div></div><div><div><span>  </span><span>},</span></div></div><div><div><span>};</span></div></div>
```

Note

`connect()` over VPC Networks currently supports plaintext TCP only.

For more details, refer to [VPC Networks](https://developers.cloudflare.com/workers-vpc/configuration/vpc-networks/) and the [Workers Binding API](https://developers.cloudflare.com/workers-vpc/api/).
</Release>

<Release date="June 16, 2026" published="2026-06-16T00:00:00.000Z" url="https://developers.cloudflare.com/changelog/post/2026-06-16-new-optimization-features/">
## Cloudflare Images - New optimization features in Images

These updates introduce new features for optimizing and manipulating with Images:

- **New `composite` option:** Control how [overlays are blended](https://developers.cloudflare.com/images/optimization/draw-overlays/#composite) with the base image.
- **Percentage widths:** Set the dimensions of an overlay as [a fraction of the dimensions](https://developers.cloudflare.com/images/optimization/draw-overlays/#width-and-height) of the base image.
- **New `fit` modes:** Use [`aspect-crop`](https://developers.cloudflare.com/images/optimization/features/#aspect-crop) to always preserve the target aspect ratio or [`scale-up`](https://developers.cloudflare.com/images/optimization/features/#scale-up) to always enlarge images.
- **New `upscale` parameter:** Apply [AI upscaling](https://developers.cloudflare.com/images/optimization/features/#upscale) to produce sharper, more detailed results when enlarging images.
</Release>

<Release date="June 16, 2026" published="2026-06-16T00:00:00.000Z" url="https://developers.cloudflare.com/changelog/post/2026-06-16-agents-sdk-v0161/">
## Agents, Workers - Agents SDK improves browser automation, code execution, and recovery

The latest release of the [Agents SDK](https://github.com/cloudflare/agents) makes it easier to build agents that can safely interact with real systems and keep working through interruptions.

Agents can now browse websites through Browser Run, write code against external tools through Codemode, use client-provided tools when delegating to Think sub-agents, and recover more reliably from deploys, Durable Object evictions, and connection churn.

#### Safer browser automation

Agents can now use [Browser Run](https://developers.cloudflare.com/browser-run/) through a single durable `browser_execute` tool. Instead of choosing from a fixed list of actions, the model writes code against the Chrome DevTools Protocol (CDP) and can inspect pages, capture screenshots, read rendered content, debug frontend behavior, and interact with live browser sessions.

- JavaScript
    
    ```js
    <div><div><span>const</span><span> </span><span>browserTools</span><span> </span><span>=</span><span> </span><span>createBrowserTools</span><span>(</span><span>{</span></div></div><div><div><span><span>  </span></span><span>ctx</span><span>:</span><span> </span><span>this</span><span>.</span><span>ctx</span><span>,</span></div></div><div><div><span><span>  </span></span><span>browser</span><span>:</span><span> </span><span>this</span><span>.</span><span>env</span><span>.</span><span>BROWSER</span><span>,</span></div></div><div><div><span><span>  </span></span><span>loader</span><span>:</span><span> </span><span>this</span><span>.</span><span>env</span><span>.</span><span>LOADER</span><span>,</span></div></div><div><div><span><span>  </span></span><span>session</span><span>:</span><span> </span><span>{</span><span> mode</span><span>:</span><span> </span><span>"dynamic"</span><span> </span><span>},</span></div></div><div><div><span>}</span><span>)</span><span>;</span></div></div>
    ```
    
- TypeScript
    
    ```ts
    <div><div><span>const</span><span> </span><span>browserTools</span><span> </span><span>=</span><span> </span><span>createBrowserTools</span><span>(</span><span>{</span></div></div><div><div><span><span>  </span></span><span>ctx</span><span>:</span><span> </span><span>this</span><span>.</span><span>ctx</span><span>,</span></div></div><div><div><span><span>  </span></span><span>browser</span><span>:</span><span> </span><span>this</span><span>.</span><span>env</span><span>.</span><span>BROWSER</span><span>,</span></div></div><div><div><span><span>  </span></span><span>loader</span><span>:</span><span> </span><span>this</span><span>.</span><span>env</span><span>.</span><span>LOADER</span><span>,</span></div></div><div><div><span><span>  </span></span><span>session</span><span>:</span><span> </span><span>{</span><span> mode</span><span>:</span><span> </span><span>"dynamic"</span><span> </span><span>},</span></div></div><div><div><span>}</span><span>)</span><span>;</span></div></div>
    ```
    

Browser sessions can be one-time, reused, or promoted from one-time to persistent during a run. This is useful when an agent needs a human to log in, complete MFA, or approve a sensitive action. The run can pause, keep the same tabs and cookies, and resume after approval.

The browser tools also add Live View URLs, optional session recording, and quick actions such as `browser_markdown`, `browser_extract`, `browser_links`, and `browser_scrape` for one-shot browsing tasks.

#### Resumable code execution with approvals

Codemode now uses `createCodemodeRuntime`, connectors, and a durable execution log. This lets you give a model one `codemode` tool instead of a large prompt full of tool definitions. The model can discover the capabilities it needs, write code against typed globals, and reuse saved snippets.

- JavaScript
    
    ```js
    <div><div><span>const</span><span> </span><span>runtime</span><span> </span><span>=</span><span> </span><span>createCodemodeRuntime</span><span>(</span><span>{</span></div></div><div><div><span><span>  </span></span><span>ctx</span><span>:</span><span> </span><span>this</span><span>.</span><span>ctx</span><span>,</span></div></div><div><div><span><span>  </span></span><span>executor</span><span>:</span><span> </span><span>new</span><span> </span><span>DynamicWorkerExecutor</span><span>(</span><span>{</span><span> loader</span><span>:</span><span> </span><span>this</span><span>.</span><span>env</span><span>.</span><span>LOADER</span><span> </span><span>}</span><span>)</span><span>,</span></div></div><div><div><span><span>  </span></span><span>connectors</span><span>:</span><span> [</span><span>new</span><span> </span><span>GithubConnector</span><span>(</span><span>this</span><span>.</span><span>ctx</span><span>,</span><span> </span><span>this</span><span>.</span><span>env</span><span>,</span><span> </span><span>connection</span><span>)]</span><span>,</span></div></div><div><div><span>}</span><span>)</span><span>;</span></div></div><div><div>
    </div></div><div><div><span>const</span><span> </span><span>result</span><span> </span><span>=</span><span> </span><span>streamText</span><span>(</span><span>{</span></div></div><div><div><span>  </span><span>model</span><span>,</span></div></div><div><div><span>  </span><span>messages</span><span>,</span></div></div><div><div><span><span>  </span></span><span>tools</span><span>:</span><span> </span><span>{</span><span> codemode</span><span>:</span><span> </span><span>runtime</span><span>.</span><span>tool</span><span>() </span><span>},</span></div></div><div><div><span>}</span><span>)</span><span>;</span></div></div>
    ```
    
- TypeScript
    
    ```ts
    <div><div><span>const</span><span> </span><span>runtime</span><span> </span><span>=</span><span> </span><span>createCodemodeRuntime</span><span>(</span><span>{</span></div></div><div><div><span><span>  </span></span><span>ctx</span><span>:</span><span> </span><span>this</span><span>.</span><span>ctx</span><span>,</span></div></div><div><div><span><span>  </span></span><span>executor</span><span>:</span><span> </span><span>new</span><span> </span><span>DynamicWorkerExecutor</span><span>(</span><span>{</span><span> loader</span><span>:</span><span> </span><span>this</span><span>.</span><span>env</span><span>.</span><span>LOADER</span><span> </span><span>}</span><span>)</span><span>,</span></div></div><div><div><span><span>  </span></span><span>connectors</span><span>:</span><span> [</span><span>new</span><span> </span><span>GithubConnector</span><span>(</span><span>this</span><span>.</span><span>ctx</span><span>,</span><span> </span><span>this</span><span>.</span><span>env</span><span>,</span><span> </span><span>connection</span><span>)]</span><span>,</span></div></div><div><div><span>}</span><span>)</span><span>;</span></div></div><div><div>
    </div></div><div><div><span>const</span><span> </span><span>result</span><span> </span><span>=</span><span> </span><span>streamText</span><span>(</span><span>{</span></div></div><div><div><span>  </span><span>model</span><span>,</span></div></div><div><div><span>  </span><span>messages</span><span>,</span></div></div><div><div><span><span>  </span></span><span>tools</span><span>:</span><span> </span><span>{</span><span> codemode</span><span>:</span><span> </span><span>runtime</span><span>.</span><span>tool</span><span>() </span><span>},</span></div></div><div><div><span>}</span><span>)</span><span>;</span></div></div>
    ```
    

When the code reaches an approval-gated action, the runtime pauses execution and returns a pending approval. After approval, completed calls replay from the durable log, the approved action runs, and the same code continues. This makes it practical to build agents that create issues, update external systems, or perform other side effects without custom pause-and-resume logic for every tool.

#### Better Think delegation

Think sub-agents can now use client-defined tools over the RPC `chat()` path. A parent agent can pass tool schemas with `clientTools` and resolve tool calls through `onClientToolCall`. This lets delegated agents use caller-provided capabilities without requiring a browser WebSocket.

- JavaScript
    
    ```js
    <div><div><span>await</span><span> </span><span>child</span><span>.</span><span>chat</span><span>(</span><span>message</span><span>,</span><span> </span><span>callback</span><span>,</span><span> </span><span>{</span></div></div><div><div><span>  </span><span>signal</span><span>,</span></div></div><div><div><span><span>  </span></span><span>clientTools</span><span>:</span><span> [</span></div></div><div><div><span>    </span><span>{</span></div></div><div><div><span><span>      </span></span><span>name</span><span>:</span><span> </span><span>"get_user_timezone"</span><span>,</span></div></div><div><div><span><span>      </span></span><span>description</span><span>:</span><span> </span><span>"Get the caller's timezone"</span><span>,</span></div></div><div><div><span><span>      </span></span><span>parameters</span><span>:</span><span> </span><span>{</span><span> type</span><span>:</span><span> </span><span>"object"</span><span> </span><span>},</span></div></div><div><div><span>    </span><span>},</span></div></div><div><div><span><span>  </span></span><span>]</span><span>,</span></div></div><div><div><span>  </span><span>onClientToolCall</span><span>:</span><span> </span><span>async</span><span> </span><span>({</span><span> </span><span>toolName</span><span>,</span><span> </span><span>input</span><span> </span><span>})</span><span> </span><span>=></span><span> </span><span>{</span></div></div><div><div><span>    </span><span>return</span><span> </span><span>runClientTool</span><span>(</span><span>toolName</span><span>,</span><span> </span><span>input</span><span>)</span><span>;</span></div></div><div><div><span>  </span><span>},</span></div></div><div><div><span>}</span><span>)</span><span>;</span></div></div>
    ```
    
- TypeScript
    
    ```ts
    <div><div><span>await</span><span> </span><span>child</span><span>.</span><span>chat</span><span>(</span><span>message</span><span>,</span><span> </span><span>callback</span><span>,</span><span> </span><span>{</span></div></div><div><div><span>  </span><span>signal</span><span>,</span></div></div><div><div><span><span>  </span></span><span>clientTools</span><span>:</span><span> [</span></div></div><div><div><span>    </span><span>{</span></div></div><div><div><span><span>      </span></span><span>name</span><span>:</span><span> </span><span>"get_user_timezone"</span><span>,</span></div></div><div><div><span><span>      </span></span><span>description</span><span>:</span><span> </span><span>"Get the caller's timezone"</span><span>,</span></div></div><div><div><span><span>      </span></span><span>parameters</span><span>:</span><span> </span><span>{</span><span> type</span><span>:</span><span> </span><span>"object"</span><span> </span><span>},</span></div></div><div><div><span>    </span><span>},</span></div></div><div><div><span><span>  </span></span><span>]</span><span>,</span></div></div><div><div><span>  </span><span>onClientToolCall</span><span>:</span><span> </span><span>async</span><span> </span><span>({</span><span> </span><span>toolName</span><span>,</span><span> </span><span>input</span><span> </span><span>})</span><span> </span><span>=></span><span> </span><span>{</span></div></div><div><div><span>    </span><span>return</span><span> </span><span>runClientTool</span><span>(</span><span>toolName</span><span>,</span><span> </span><span>input</span><span>)</span><span>;</span></div></div><div><div><span>  </span><span>},</span></div></div><div><div><span>}</span><span>)</span><span>;</span></div></div>
    ```
    

Think Workflows also improve `step.prompt()`. A prompt step now runs a full agentic turn before returning structured output, so the agent can call tools before producing the typed result. This makes Workflow steps more useful for durable triage, research, and approval flows.

The unified Think execute tool can also include `cdp.*` browser capabilities alongside `state.*` and `tools.*` when Browser Run is bound.

#### Voice output device selection

Voice clients can route assistant audio to a specific output device. Use `outputDeviceId` with `useVoiceAgent`, or call `client.setOutputDevice()` from the framework-agnostic client.

- JavaScript
    
    ```js
    <div><div><span>const</span><span> </span><span>voice</span><span> </span><span>=</span><span> </span><span>useVoiceAgent</span><span>(</span><span>{</span></div></div><div><div><span><span>  </span></span><span>agent</span><span>:</span><span> </span><span>"MyVoiceAgent"</span><span>,</span></div></div><div><div><span><span>  </span></span><span>outputDeviceId</span><span>:</span><span> </span><span>selectedSpeakerId</span><span>,</span></div></div><div><div><span>}</span><span>)</span><span>;</span></div></div>
    ```
    
- TypeScript
    
    ```ts
    <div><div><span>const</span><span> </span><span>voice</span><span> </span><span>=</span><span> </span><span>useVoiceAgent</span><span>(</span><span>{</span></div></div><div><div><span><span>  </span></span><span>agent</span><span>:</span><span> </span><span>"MyVoiceAgent"</span><span>,</span></div></div><div><div><span><span>  </span></span><span>outputDeviceId</span><span>:</span><span> </span><span>selectedSpeakerId</span><span>,</span></div></div><div><div><span>}</span><span>)</span><span>;</span></div></div>
    ```
    

Browsers without speaker-selection support continue playing through the default output device and report a non-fatal `outputDeviceError`.

#### Reliability fixes

This release includes several fixes for production agents:

- `useAgent` and `AgentClient` handle WebSocket replacement more reliably during reconnects and configuration changes.
- Chat stream replay is more reliable after reconnects, deploys, and provider errors.
- Fiber recovery continues across multi-pass scans and backs off when recovery hooks keep failing.
- Agent teardown continues even when the request that started teardown is canceled.
- Large session histories use byte-budgeted reads to reduce memory pressure during startup.

#### Upgrade

To update to the latest version:

```
<span>npm</span><span> i agents@latest @cloudflare/think@latest @cloudflare/codemode@latest @cloudflare/ai-chat@latest @cloudflare/voice@latest</span>
```

```
<span>yarn</span><span> add agents@latest @cloudflare/think@latest @cloudflare/codemode@latest @cloudflare/ai-chat@latest @cloudflare/voice@latest</span>
```

```
<span>pnpm</span><span> add agents@latest @cloudflare/think@latest @cloudflare/codemode@latest @cloudflare/ai-chat@latest @cloudflare/voice@latest</span>
```

```
<span>bun</span><span> add agents@latest @cloudflare/think@latest @cloudflare/codemode@latest @cloudflare/ai-chat@latest @cloudflare/voice@latest</span>
```

Refer to the [Codemode documentation](https://developers.cloudflare.com/agents/model-context-protocol/protocol/codemode/), [Browser tools documentation](https://developers.cloudflare.com/agents/tools/browser/), [Think tools documentation](https://developers.cloudflare.com/agents/harnesses/think/tools/), and [Voice documentation](https://developers.cloudflare.com/agents/communication-channels/voice/) for more information.
</Release>

<Release date="June 16, 2026" published="2026-06-16T00:00:00.000Z" url="https://developers.cloudflare.com/changelog/post/2026-06-16-custom-spans/">
## Workers - Workers tracing now supports custom spans

You can now create custom trace spans in your Workers code using `tracing.enterSpan()`. Custom spans appear alongside the automatic platform instrumentation (fetch calls, KV reads, D1 queries, and other platform operations) in your traces and OpenTelemetry exports, with correct parent-child nesting.

The API is available via `import { tracing } from "cloudflare:workers"` or through the handler context as `ctx.tracing`:

```ts
<div><div><span>import </span><span>{</span><span><span> </span><span>tracing</span><span> </span></span><span>}</span><span> from </span><span>"cloudflare:workers"</span><span>;</span></div></div><div><div>
</div></div><div><div><span>export</span><span> </span><span>default</span><span> </span><span>{</span></div></div><div><div><span>  </span><span>async</span><span> </span><span>fetch</span><span>(</span><span>request</span><span>,</span><span> </span><span>env</span><span>,</span><span> </span><span>ctx</span><span>)</span><span> </span><span>{</span></div></div><div><div><span>    </span><span>return</span><span> </span><span>tracing</span><span>.</span><span>enterSpan</span><span>(</span><span>"handleRequest"</span><span>,</span><span> </span><span>async</span><span> </span><span>(</span><span>span</span><span>)</span><span> </span><span>=></span><span> </span><span>{</span></div></div><div><div><span><span>      </span></span><span>span</span><span>.</span><span>setAttribute</span><span>(</span><span>"url.path"</span><span>,</span><span> </span><span>new</span><span> </span><span>URL</span><span>(</span><span>request</span><span>.</span><span>url</span><span>)</span><span>.</span><span>pathname</span><span>)</span><span>;</span></div></div><div><div><span>      </span><span>const</span><span> </span><span>data</span><span> </span><span>=</span><span> </span><span>await</span><span> </span><span>env</span><span>.</span><span>MY_KV</span><span>.</span><span>get</span><span>(</span><span>"key"</span><span>)</span><span>;</span></div></div><div><div><span>      </span><span>return</span><span> </span><span>new</span><span> </span><span>Response</span><span>(</span><span>data</span><span>)</span><span>;</span></div></div><div><div><span>    </span><span>}</span><span>)</span><span>;</span></div></div><div><div><span>  </span><span>},</span></div></div><div><div><span>};</span></div></div>
```

Spans nest automatically based on the JavaScript async context, and are auto-ended when the callback returns or its returned promise settles. The `Span` object provides `setAttribute(key, value)` for attaching metadata and an `isTraced` property to check whether the current request is being sampled.

![Trace waterfall showing custom spans nested alongside automatic KV and fetch instrumentation](https://developers.cloudflare.com/_astro/wobs_custom_spans_screenshot.B-hsHjyv_ZGVlIY.webp)

[Tracing must be enabled](https://developers.cloudflare.com/workers/observability/traces/#how-to-enable-tracing) in your Wrangler configuration for spans to be recorded.

For full API details and examples, refer to [Custom spans](https://developers.cloudflare.com/workers/observability/traces/custom-spans/).
</Release>

<Release date="June 12, 2026" published="2026-06-12T00:00:00.000Z" url="https://developers.cloudflare.com/changelog/post/2026-06-12-user-agent-logging/">
## AI Gateway - View the user agent of requests in AI Gateway logs

AI Gateway logs now capture the user agent of the client that made each request, making it easier to identify which SDK, library, or application sent the traffic flowing through your gateway. For example, you can tell apart requests coming from `openai-python` versus a custom application or a Cloudflare Worker.

The user agent appears alongside the other details in each log entry, and you can filter logs by user agent (equals, does not equal, or contains) in the dashboard.

For more information, refer to [Logging](https://developers.cloudflare.com/ai-gateway/observability/logging/).
</Release>

<Release version="2.7" date="June 12, 2026" published="2026-06-12T00:00:00.000Z" url="https://developers.cloudflare.com/changelog/post/2026-06-12-kimi-k2-7-code-workers-ai/">
## Workers AI - Moonshot AI Kimi K2.7 Code now available on Workers AI

[`@cf/moonshotai/kimi-k2.7-code`](https://developers.cloudflare.com/workers-ai/models/kimi-k2.7-code/) is now available on Workers AI. Kimi K2.7 Code is a code-optimized variant of the Kimi K2 family, built on a Mixture-of-Experts architecture with 1T total parameters and 32B active per token.

#### Improved coding and agent performance

K2.7 Code delivers meaningful gains over K2.6 on coding and agentic benchmarks:

- **+21.8%** on Kimi Code Bench v2
- **+11.0%** on Program Bench
- **+31.5%** on MLS Bench Lite

#### Reasoning efficiency

K2.7 Code uses 30% fewer reasoning tokens compared to K2.6, reducing overthinking and lowering inference cost for reasoning-heavy workloads.

#### Key capabilities

- **262.1k token context window** for retaining full conversation history, tool definitions, and codebases across long-running agent sessions
- **Long-horizon coding** with improved instruction following and higher end-to-end coding task success rates
- **Vision inputs** for processing images alongside text
- **Thinking mode** with configurable reasoning depth via `chat_template_kwargs.thinking`
- **Multi-turn tool calling** for building agents that invoke tools across multiple conversation turns
- **Structured outputs** with JSON schema support

#### Differences from Kimi K2.6

If you are migrating from Kimi K2.6, note the following:

- K2.7 Code is optimized for coding tasks with improved benchmark performance and reasoning efficiency
- Cached input token pricing is $0.19 per M tokens (vs $0.16 for K2.6)
- API usage is identical — no parameter changes required

#### Get started

Use Kimi K2.7 Code through the [Workers AI binding](https://developers.cloudflare.com/workers-ai/configuration/bindings/) (`env.AI.run()`), the REST API at `/ai/run`, or the OpenAI-compatible endpoint at `/v1/chat/completions`. You can also use [AI Gateway](https://developers.cloudflare.com/ai-gateway/) with any of these endpoints.

For more information, refer to the [Kimi K2.7 Code model page](https://developers.cloudflare.com/workers-ai/models/kimi-k2.7-code/) and [pricing](https://developers.cloudflare.com/workers-ai/platform/pricing/).
</Release>

<Release date="June 12, 2026" published="2026-06-12T00:00:00.000Z" url="https://developers.cloudflare.com/changelog/post/2026-06-12-durable-objects-metrics-filter-by-id-name/">
## Durable Objects, Workers - Filter Durable Objects metrics by object ID or name

You can now filter the **Metrics** tab for a Durable Objects namespace by an individual Durable Object's [ID](https://developers.cloudflare.com/durable-objects/api/id/) or [name](https://developers.cloudflare.com/durable-objects/api/id/#name) in the Cloudflare dashboard. Previously, metrics charts only showed aggregate, namespace-level data, making it difficult to isolate the behavior of a specific object.

[Go to **Durable Objects**](https://dash.cloudflare.com/?to=/:account/workers/durable-objects) ![The Durable Objects Metrics tab filtered to a single object by ID, showing per-object requests and errors by invocation status.](https://developers.cloudflare.com/_astro/durable-objects-metrics-dashboard.BFZTyhWU_Z2e46Sb.webp)

Start typing an ID or name into the filter and select a match from the autocomplete dropdown. The autocomplete only shows objects with invocations during the selected time range, so an object that does not appear has not been invoked in that window. This does not necessarily mean the object has been deleted. Every chart on the page updates to reflect only the selected object. This makes it easier to identify and investigate a single Durable Object when debugging a high-traffic object, an error spike, or unexpected storage usage. Clear the filter to return to namespace-level metrics.

Metrics are powered by the [GraphQL Analytics API](https://developers.cloudflare.com/analytics/graphql-api/), so standard analytics behavior such as ingestion delay and [sampling](https://developers.cloudflare.com/analytics/faq/graphql-api-inconsistent-results/) applies.

For more information, refer to [Metrics and analytics](https://developers.cloudflare.com/durable-objects/observability/metrics-and-analytics/).
</Release>

<Release date="June 11, 2026" published="2026-06-11T00:00:00.000Z" url="https://developers.cloudflare.com/changelog/post/2026-06-11-dynamic-workers-count/">
## Workers - Track Dynamic Workers usage from the dashboard and GraphQL API

![Dynamic Workers usage on the Workers overview page](https://developers.cloudflare.com/_astro/dynamic-workers-count.BcGsgQ0m_ZBdT2X.webp)

Customers can now view the number of [Dynamic Workers](https://developers.cloudflare.com/dynamic-workers/) invoked during their billing period from the Workers overview page in the Cloudflare dashboard.

This count reflects the number of Dynamic Workers that Cloudflare would bill for during the selected billing period. Dynamic Workers usage data only goes back to June 1, 2026.

You can also query this count through the [GraphQL Analytics API](https://developers.cloudflare.com/analytics/graphql-api/) by using `workersInvocationsByOwnerAndScriptGroups` and selecting `distinctDynamicWorkerCount`:

```graphql
<div><div><span>query</span><span> </span><span>getDynamicWorkersCount</span><span>(</span></div></div><div><div><span>  </span><span>$accountTag</span><span>:</span><span> </span><span>string</span><span>!</span></div></div><div><div><span>  </span><span>$filter</span><span>:</span><span> </span><span>AccountWorkersInvocationsByOwnerAndScriptGroupsFilter_InputObject</span></div></div><div><div><span>) </span><span>{</span></div></div><div><div><span><span>  </span></span><span>viewer</span><span> </span><span>{</span></div></div><div><div><span><span>    </span></span><span>accounts</span><span>(</span><span>filter</span><span>:</span><span> { </span><span>accountTag</span><span>:</span><span> </span><span>$accountTag</span><span> }) </span><span>{</span></div></div><div><div><span><span>      </span></span><span>workersInvocationsByOwnerAndScriptGroups</span><span>(</span><span>limit</span><span>:</span><span> </span><span>10000</span><span>,</span><span> </span><span>filter</span><span>:</span><span> </span><span>$filter</span><span>) </span><span>{</span></div></div><div><div><span><span>        </span></span><span>uniq</span><span> </span><span>{</span></div></div><div><div><span><span>          </span></span><span>distinctDynamicWorkerCount</span></div></div><div><div><span>        </span><span>}</span></div></div><div><div><span>      </span><span>}</span></div></div><div><div><span>    </span><span>}</span></div></div><div><div><span>  </span><span>}</span></div></div><div><div><span>}</span></div></div>
```

Use variables to set the account and billing-period date range:

```json
<div><div><span>{</span></div></div><div><div><span>  </span><span>"</span><span>accountTag</span><span>"</span><span>:</span><span> </span><span>"<ACCOUNT_ID>"</span><span>,</span></div></div><div><div><span>  </span><span>"</span><span>filter</span><span>"</span><span>:</span><span> </span><span>{</span></div></div><div><div><span>    </span><span>"</span><span>date_geq</span><span>"</span><span>:</span><span> </span><span>"2026-06-01"</span><span>,</span></div></div><div><div><span>    </span><span>"</span><span>date_leq</span><span>"</span><span>:</span><span> </span><span>"2026-06-30"</span></div></div><div><div><span>  </span><span>}</span></div></div><div><div><span>}</span></div></div>
```

For more information, refer to [Dynamic Workers pricing](https://developers.cloudflare.com/dynamic-workers/pricing/).
</Release>

<Release date="June 11, 2026" published="2026-06-11T00:00:00.000Z" url="https://developers.cloudflare.com/changelog/post/2026-06-11-browser-run-snapshot-formats/">
## Browser Run - New formats parameter for the Browser Run /snapshot endpoint

[Browser Run](https://developers.cloudflare.com/browser-run/)'s [`/snapshot` endpoint](https://developers.cloudflare.com/browser-run/quick-actions/snapshot/) now supports a `formats` parameter that lets you return multiple page formats in a single API call. Previously, `/snapshot` returned only HTML content and a screenshot. You can now also include Markdown and the accessibility tree in the same response.

These formats are particularly useful for AI agent workflows:

- Markdown provides a token-efficient representation of page content that LLMs can process directly, without parsing HTML markup.
- The accessibility tree provides a structured representation of a page's elements, including roles, labels, and hierarchy, helping LLMs understand page structure and navigate its contents.

The following example returns a screenshot, Markdown, and the accessibility tree in one call:

- curl
    
    ```bash
    <div><div><span>curl</span><span> </span><span>-X</span><span> </span><span>POST</span><span> </span><span>'https://api.cloudflare.com/client/v4/accounts/<accountId>/browser-rendering/snapshot'</span><span> </span><span>\</span></div></div><div><div><span>  </span><span>-H</span><span> </span><span>'Authorization: Bearer <apiToken>'</span><span> </span><span>\</span></div></div><div><div><span>  </span><span>-H</span><span> </span><span>'Content-Type: application/json'</span><span> </span><span>\</span></div></div><div><div><span>  </span><span>-d</span><span> </span><span>'{</span></div></div><div><div><span><span>    </span></span><span>"url": "https://example.com/",</span></div></div><div><div><span><span>    </span></span><span>"formats": ["screenshot", "markdown", "accessibilityTree"]</span></div></div><div><div><span><span>  </span></span><span>}'</span></div></div>
    ```
    
- TypeScript SDK
    
    ```typescript
    <div><div><span><span>import </span><span>Cloudflare</span><span> from </span></span><span>"cloudflare"</span><span>;</span></div></div><div><div>
    </div></div><div><div><span>const</span><span> </span><span>client</span><span> </span><span>=</span><span> </span><span>new</span><span> </span><span>Cloudflare</span><span>(</span><span>{</span></div></div><div><div><span><span>  </span></span><span>apiToken</span><span>:</span><span> </span><span>process</span><span>.</span><span>env</span><span>[</span><span>"CLOUDFLARE_API_TOKEN"</span><span>]</span><span>,</span></div></div><div><div><span>}</span><span>)</span><span>;</span></div></div><div><div>
    </div></div><div><div><span>const</span><span> </span><span>snapshot</span><span> </span><span>=</span><span> </span><span>await</span><span> </span><span>client</span><span>.</span><span>browserRendering</span><span>.</span><span>snapshot</span><span>.</span><span>create</span><span>(</span><span>{</span></div></div><div><div><span><span>  </span></span><span>account_id</span><span>:</span><span> </span><span>process</span><span>.</span><span>env</span><span>[</span><span>"CLOUDFLARE_ACCOUNT_ID"</span><span>]</span><span>,</span></div></div><div><div><span><span>  </span></span><span>url</span><span>:</span><span> </span><span>"https://example.com/"</span><span>,</span></div></div><div><div><span><span>  </span></span><span>formats</span><span>:</span><span> [</span><span>"screenshot"</span><span>,</span><span> </span><span>"markdown"</span><span>,</span><span> </span><span>"accessibilityTree"</span><span>]</span><span>,</span></div></div><div><div><span>}</span><span>)</span><span>;</span></div></div><div><div>
    </div></div><div><div><span>console</span><span>.</span><span>log</span><span>(</span><span>snapshot</span><span>.</span><span>markdown</span><span>)</span><span>;</span></div></div><div><div><span>console</span><span>.</span><span>log</span><span>(</span><span>snapshot</span><span>.</span><span>accessibilityTree</span><span>)</span><span>;</span></div></div>
    ```
    
- Workers Bindings
    
    ```typescript
    <div><div><span>interface</span><span> </span><span>Env</span><span> </span><span>{</span></div></div><div><div><span><span>  </span></span><span>BROWSER</span><span>:</span><span> </span><span>BrowserRun</span><span>;</span></div></div><div><div><span>}</span></div></div><div><div>
    </div></div><div><div><span>export</span><span> </span><span>default</span><span> </span><span>{</span></div></div><div><div><span>  </span><span>async</span><span> </span><span>fetch</span><span>(</span><span>request</span><span>,</span><span> </span><span>env</span><span>)</span><span>:</span><span> </span><span>Promise</span><span><</span><span>Response</span><span>></span><span> </span><span>{</span></div></div><div><div><span>    </span><span>return</span><span> </span><span>await</span><span> </span><span>env</span><span>.</span><span>BROWSER</span><span>.</span><span>quickAction</span><span>(</span><span>"snapshot"</span><span>,</span><span> </span><span>{</span></div></div><div><div><span><span>      </span></span><span>url</span><span>:</span><span> </span><span>"https://example.com/"</span><span>,</span></div></div><div><div><span><span>      </span></span><span>formats</span><span>:</span><span> [</span><span>"screenshot"</span><span>,</span><span> </span><span>"markdown"</span><span>,</span><span> </span><span>"accessibilityTree"</span><span>]</span><span>,</span></div></div><div><div><span>    </span><span>}</span><span>)</span><span>;</span></div></div><div><div><span>  </span><span>},</span></div></div><div><div><span>}</span><span> </span><span>satisfies</span><span> </span><span>ExportedHandler</span><span><</span><span>Env</span><span>>;</span></div></div>
    ```
    

You must request at least two formats. If you only need one, use the respective single-format endpoint such as [`/screenshot`](https://developers.cloudflare.com/browser-run/quick-actions/screenshot-endpoint/) or [`/markdown`](https://developers.cloudflare.com/browser-run/quick-actions/markdown-endpoint/).

Refer to the [`/snapshot` documentation](https://developers.cloudflare.com/browser-run/quick-actions/snapshot/) for the full list of accepted values.
</Release>

<Release date="June 10, 2026" published="2026-06-10T00:00:00.000Z" url="https://developers.cloudflare.com/changelog/post/2026-06-10-hosted-images-binding/">
## Cloudflare Images - Manage hosted images with the Images binding

Use the Images binding to upload, list, retrieve, update, and delete images stored in Images directly from your Worker without managing API tokens or making HTTP requests.

The `env.IMAGES.hosted` namespace supports the following storage and management operations:

- [`.upload(image, options)`](https://developers.cloudflare.com/images/storage/binding/#uploadimage-options) — Upload a new image to your account.
- [`.list(options)`](https://developers.cloudflare.com/images/storage/binding/#listoptions) — List images with pagination.
- [`.image(imageId).details()`](https://developers.cloudflare.com/images/storage/binding/#imageimageiddetails) — Get image metadata.
- [`.image(imageId).bytes()`](https://developers.cloudflare.com/images/storage/binding/#imageimageidbytes) — Stream the original image bytes.
- [`.image(imageId).update(options)`](https://developers.cloudflare.com/images/storage/binding/#imageimageidupdateoptions) — Update metadata or access controls.
- [`.image(imageId).delete()`](https://developers.cloudflare.com/images/storage/binding/#imageimageiddelete) — Delete an image.

For example, you can upload an image from a request body and return its metadata:

```ts
<div><div><span>const</span><span> </span><span>image</span><span> </span><span>=</span><span> </span><span>await</span><span> </span><span>env</span><span>.</span><span>IMAGES</span><span>.</span><span>hosted</span><span>.</span><span>upload</span><span>(</span><span>request</span><span>.</span><span>body</span><span>,</span><span> </span><span>{</span></div></div><div><div><span><span>  </span></span><span>filename</span><span>:</span><span> </span><span>"upload.jpg"</span><span>,</span></div></div><div><div><span><span>  </span></span><span>metadata</span><span>:</span><span> </span><span>{</span><span> source</span><span>:</span><span> </span><span>"worker"</span><span> </span><span>},</span></div></div><div><div><span>}</span><span>)</span><span>;</span></div></div><div><div>
</div></div><div><div><span>return</span><span> </span><span>Response</span><span>.</span><span>json</span><span>(</span><span>image</span><span>)</span><span>;</span></div></div>
```

Or retrieve and serve the original bytes of a hosted image:

```ts
<div><div><span>const</span><span> </span><span>bytes</span><span> </span><span>=</span><span> </span><span>await</span><span> </span><span>env</span><span>.</span><span>IMAGES</span><span>.</span><span>hosted</span><span>.</span><span>image</span><span>(</span><span>"IMAGE_ID"</span><span>)</span><span>.</span><span>bytes</span><span>()</span><span>;</span></div></div><div><div><span>return</span><span> </span><span>new</span><span> </span><span>Response</span><span>(</span><span>bytes</span><span>)</span><span>;</span></div></div>
```

For more information, refer to the [Images binding](https://developers.cloudflare.com/images/storage/binding/).
</Release>

<Release date="June 10, 2026" published="2026-06-10T00:00:00.000Z" url="https://developers.cloudflare.com/changelog/post/2026-06-10-api-reference/">
## Flagship - Flagship API reference now available

The **[Flagship API reference](https://developers.cloudflare.com/api/resources/flagship/)** is now available. You can use the Cloudflare API to create and update apps, and to create, update, delete, and list feature flags without using the dashboard.

For example, create a new boolean flag with the API:

```bash
<div><div><span>curl</span><span> </span><span>https://api.cloudflare.com/client/v4/accounts/</span><span>$ACCOUNT_ID</span><span>/flagship/apps/</span><span>$APP_ID</span><span>/flags</span><span> </span><span>\</span></div></div><div><div><span>  </span><span>-H</span><span> </span><span>"Content-Type: application/json"</span><span> </span><span>\</span></div></div><div><div><span>  </span><span>-H</span><span> </span><span>"Authorization: Bearer </span><span>$CLOUDFLARE_API_TOKEN</span><span>"</span><span> </span><span>\</span></div></div><div><div><span>  </span><span>-d</span><span> </span><span>'{</span></div></div><div><div><span><span>    </span></span><span>"key": "new-checkout",</span></div></div><div><div><span><span>    </span></span><span>"enabled": true,</span></div></div><div><div><span><span>    </span></span><span>"default_variation": "off",</span></div></div><div><div><span><span>    </span></span><span>"variations": {</span></div></div><div><div><span><span>      </span></span><span>"off": false,</span></div></div><div><div><span><span>      </span></span><span>"on": true</span></div></div><div><div><span><span>    </span></span><span>},</span></div></div><div><div><span><span>    </span></span><span>"rules": []</span></div></div><div><div><span><span>  </span></span><span>}'</span></div></div>
```

To create an API token, go to [Account API Tokens](https://dash.cloudflare.com/?to=/:account/api-tokens) in the Cloudflare dashboard and search for Flagship.

The API reference includes endpoints for Flagship apps, flags, changelog entries, and flag evaluation. Agents can also use the [Flagship reference in the Cloudflare skill](https://github.com/cloudflare/skills/tree/main/skills/cloudflare/references/flagship) to create and manage Flagship resources.

Refer to the [Flagship documentation](https://developers.cloudflare.com/flagship/) to learn more about evaluating feature flags from your applications.
</Release>

<Release date="June 10, 2026" published="2026-06-10T00:00:00.000Z" url="https://developers.cloudflare.com/changelog/post/2026-06-10-ai-search-namespace-wrangler-commands/">
## AI Search - Manage AI Search namespaces with Wrangler CLI

[AI Search](https://developers.cloudflare.com/ai-search/) now supports namespace-level Wrangler commands, making it easier to manage [namespaces](https://developers.cloudflare.com/ai-search/concepts/namespaces/) from your terminal, scripts, and agent workflows.

The following commands are available:

Command

Description

`wrangler ai-search namespace list`

List AI Search namespaces

`wrangler ai-search namespace create`

Create a new AI Search namespace

`wrangler ai-search namespace get`

Get details for a namespace

`wrangler ai-search namespace update`

Update a namespace description

`wrangler ai-search namespace delete`

Delete an AI Search namespace

Create a namespace for a new application or tenant directly from the CLI:

```sh
<div><div><span>wrangler</span><span> </span><span>ai-search</span><span> </span><span>namespace</span><span> </span><span>create</span><span> </span><span>docs-production</span><span> </span><span>--description</span><span> </span><span>"Production documentation search"</span></div></div>
```

List namespaces with pagination or filter by name or description:

```sh
<div><div><span>wrangler</span><span> </span><span>ai-search</span><span> </span><span>namespace</span><span> </span><span>list</span><span> </span><span>--search</span><span> </span><span>docs</span><span> </span><span>--page</span><span> </span><span>1</span><span> </span><span>--per-page</span><span> </span><span>10</span></div></div>
```

Use `--json` with `list`, `create`, `get`, and `update` to return structured output that automation and AI agents can parse directly.

Instance-level commands also now support a `--namespace` flag, so you can interact with instances inside a specific namespace from the CLI:

```sh
<div><div><span>wrangler</span><span> </span><span>ai-search</span><span> </span><span>list</span><span> </span><span>--namespace</span><span> </span><span>docs-production</span></div></div>
```

For full usage details, refer to the [AI Search Wrangler commands documentation](https://developers.cloudflare.com/ai-search/wrangler-commands/).
</Release>

<Release date="June 9, 2026" published="2026-06-09T00:00:00.000Z" url="https://developers.cloudflare.com/changelog/post/2026-06-09-deprecating-sandbox-sdk-features/">
## Sandbox SDK - Deprecating Sandbox SDK features

Today we are announcing the deprecation of several features from the Sandbox SDK. The SDK has grown and matured substantially since it first launched. As agent workflows have developed, we have shipped many new features and experiments so developers can easily integrate secure, isolated code execution into their workflows.

We want the SDK to continue providing a stable foundation for agentic workflows while we iterate quickly on the codebase. These deprecated features have either been superseded by newer capabilities or seen low adoption. They will remain in the codebase until July 9, 2026, after which they will no longer be present in future Sandbox SDK versions.

#### HTTP and WebSocket transports

In April 2026, we released the new RPC transport and deprecated the WebSocket transport. This setting governs how the sandbox container talks to the Workers ecosystem. The RPC transport removes the limitations of both the HTTP and WebSocket transports. As of June 9, 2026, it is the recommended default. HTTP and WebSocket transports will no longer be present in Sandbox SDK versions released after July 9, 2026.

To migrate before July 9, 2026, update the `SANDBOX_TRANSPORT` variable to `rpc` or set the `transport` option when calling `getSandbox()`. For more information, refer to the [transport configuration documentation](https://developers.cloudflare.com/sandbox/configuration/transport/).

#### Desktop

The desktop feature landed as a technical demonstration of what can be done with the Sandbox SDK — controlling a full browser environment from within a sandbox. With [Cloudflare Browser Run](https://developers.cloudflare.com/browser-run/) now available, this feature saw very little use. We have removed it in `0.10.2`.

#### Expose ports

We recently released support for Cloudflare Tunnel in the Sandbox SDK. This provides a robust API for exposing services running in your sandbox to the public internet. It fixes issues many were facing with local development and deployment to `workers.dev` domains. To migrate from `exposePort()` to tunnels, refer to the [tunnels API documentation](https://developers.cloudflare.com/sandbox/api/tunnels/) and the [expose services guide](https://developers.cloudflare.com/sandbox/guides/expose-services/).

#### Default sessions

By default, the `exec()` method in the Sandbox SDK maintains a default session across all calls, so a `cd` in one call is honored in the next. This convenience helped developers writing `exec` statements by hand, but confused agents and caused hard-to-trace bugs. As of `0.10.3`, we have introduced the [`enableDefaultSession`](https://developers.cloudflare.com/sandbox/configuration/sandbox-options/) flag on the `getSandbox()` interface to turn this off. Default sessions as a concept — and the flag — will be removed in an upcoming release.

We recommend setting `enableDefaultSession: false` today and using the [`sandbox.createSession()` API](https://developers.cloudflare.com/sandbox/api/sessions/) when you need the previous behavior.

#### Other changes

We are also consolidating all APIs that buffer data to support streaming by default. This includes [`readFile`, `writeFile`](https://developers.cloudflare.com/sandbox/api/files/), and [`exec`](https://developers.cloudflare.com/sandbox/api/commands/). The stream equivalents will be removed.

We are exploring moving non-core features like the [code interpreter](https://developers.cloudflare.com/sandbox/guides/code-execution/), [terminal](https://developers.cloudflare.com/sandbox/api/terminal/), and [git APIs](https://developers.cloudflare.com/sandbox/guides/git-workflows/) into helpers. These features will retain their existing APIs, so migration should be simple.

#### Next steps

If you use any of these features, refer to the [2026 deprecation migration guide](https://developers.cloudflare.com/sandbox/guides/2026-deprecation/). We also provide an [agent skill](https://developers.cloudflare.com/sandbox/guides/2026-deprecation/SKILL.md) to help with the migration.

For any questions, ask in the [Cloudflare Developers Discord](https://discord.gg/cloudflaredev).
</Release>

<Release date="June 8, 2026" published="2026-06-08T00:00:00.000Z" url="https://developers.cloudflare.com/changelog/post/2026-06-05-union-intersect-except-select-distinct/">
## R2 SQL - R2 SQL now supports UNION, INTERSECT, EXCEPT, and SELECT DISTINCT

[R2 SQL](https://developers.cloudflare.com/r2-sql/) now supports set operations (`UNION`, `INTERSECT`, `EXCEPT`) and `SELECT DISTINCT`, expanding the range of analytical queries you can run directly on [Apache Iceberg](https://iceberg.apache.org/) tables in [R2 Data Catalog](https://developers.cloudflare.com/r2/data-catalog/).

#### Set operations

Combine the results of multiple `SELECT` statements:

- **`UNION`** — returns all rows from both queries, removing duplicates
- **`UNION ALL`** — returns all rows from both queries, including duplicates
- **`INTERSECT`** — returns only rows that appear in both queries
- **`EXCEPT`** — returns rows from the first query that do not appear in the second

```sql
<div><div><span>-- Find zones that had either firewall blocks OR high-risk requests</span></div></div><div><div><span>SELECT</span><span> zone_id </span><span>FROM</span><span> my_namespace.firewall_events </span><span>WHERE</span><span> </span><span>action</span><span> </span><span>=</span><span> </span><span>'block'</span></div></div><div><div><span>UNION</span></div></div><div><div><span>SELECT</span><span> zone_id </span><span>FROM</span><span> my_namespace.http_requests </span><span>WHERE</span><span> risk_score </span><span>></span><span> </span><span>0</span><span>.</span><span>8</span></div></div>
```

```sql
<div><div><span>-- Find zones with both firewall blocks AND high traffic</span></div></div><div><div><span>SELECT</span><span> zone_id </span><span>FROM</span><span> my_namespace.firewall_events </span><span>WHERE</span><span> </span><span>action</span><span> </span><span>=</span><span> </span><span>'block'</span></div></div><div><div><span>INTERSECT</span></div></div><div><div><span>SELECT</span><span> zone_id </span><span>FROM</span><span> my_namespace.http_requests</span></div></div><div><div><span>GROUP BY</span><span> zone_id</span></div></div><div><div><span>HAVING</span><span> </span><span>COUNT</span><span>(</span><span>*</span><span>) </span><span>></span><span> </span><span>10000</span></div></div>
```

```sql
<div><div><span>-- Find enterprise zones that have not been compacted</span></div></div><div><div><span>SELECT</span><span> zone_id </span><span>FROM</span><span> my_namespace.zones </span><span>WHERE</span><span> plan </span><span>=</span><span> </span><span>'enterprise'</span></div></div><div><div><span>EXCEPT</span></div></div><div><div><span>SELECT</span><span> zone_id </span><span>FROM</span><span> my_namespace.compaction_history</span></div></div>
```

#### Select distinct

Eliminate duplicate rows from query results:

```sql
<div><div><span>SELECT DISTINCT</span><span> region, department</span></div></div><div><div><span>FROM</span><span> my_namespace.sales_data</span></div></div><div><div><span>WHERE</span><span> total_amount </span><span>></span><span> </span><span>1000</span></div></div><div><div><span>ORDER BY</span><span> region, department</span></div></div><div><div><span>LIMIT</span><span> </span><span>100</span></div></div>
```

For large datasets where approximate results are acceptable, `approx_distinct()` remains a faster alternative for counting unique values.

For the full syntax reference, refer to the [SQL reference](https://developers.cloudflare.com/r2-sql/sql-reference/). For performance guidance, refer to [Limitations and best practices](https://developers.cloudflare.com/r2-sql/reference/limitations-best-practices/).
</Release>

<Pagination cursor="2026-06-08T00:00:00.000Z|2026-06-19T21:07:31.181Z|rel_Og1agnhh9Kqdf4i0MWMKs" next="https://releases.sh/cloudflare/cloudflare-developer-platform.md?cursor=2026-06-08T00%3A00%3A00.000Z%7C2026-06-19T21%3A07%3A31.181Z%7Crel_Og1agnhh9Kqdf4i0MWMKs&limit=20" />
