---
title: "Introducing Worker Previews: isolated preview environments for every change your agent makes"
description: "Worker Previews gives every Git branch its own production-like environment with an isolated URL, configuration, state, and observability. Developers deploy a Preview using npx wrangler preview, which creates a separate Worker version with its own variables, secrets, and bindings, distinct from production, on a stable URL that updates with each push. Durable Objects and Containers automatically receive new namespaces per Preview, preventing state contamination across branches during migrations or schema changes. Each Preview supports full observability—logs, errors, metrics, and traces—scoped to that branch, enabling agents to autonomously test, catch failures, push fixes, and verify before production. The feature enables an Agent Development Lifecycle where every change is atomic, independently deployable, and revisable before merging to production."
---

# Introducing Worker Previews: isolated preview environments for every change your agent makes

[Cloudflare](https://yomu.fyi/company/cloudflare) · Nanda Syahrasyad · Sep 22, 2026

**Type:** Announcement

## Summary

Worker Previews gives every Git branch its own production-like environment with an isolated URL, configuration, state, and observability. Developers deploy a Preview using npx wrangler preview, which creates a separate Worker version with its own variables, secrets, and bindings, distinct from production, on a stable URL that updates with each push. Durable Objects and Containers automatically receive new namespaces per Preview, preventing state contamination across branches during migrations or schema changes. Each Preview supports full observability—logs, errors, metrics, and traces—scoped to that branch, enabling agents to autonomously test, catch failures, push fixes, and verify before production. The feature enables an Agent Development Lifecycle where every change is atomic, independently deployable, and revisable before merging to production.

## Context

Cloudflare introduces Worker Previews to solve the problem of changes behaving differently in production than in staging, especially as agents push more code. The feature gives each Git branch its own isolated environment with URL, configuration, state, and observability, enabling pre-production testing without affecting production or other branches.

## Approach / What changed

Worker Previews creates an isolated preview environment per Git branch using npx wrangler preview. Each Preview gets its own Worker version with separate variables, secrets, bindings, and a stable URL that updates with each push. Durable Objects and Containers automatically receive new namespaces per Preview to prevent state contamination. Base configuration is set once in a previews block in the Wrangler configuration file, with per-Preview overrides. Observability tools (logs, errors, metrics, traces) are scoped to each Preview. Custom domains are supported for consistent auth and CORS behavior.

## Takeaways

- Worker Previews automatically creates new Durable Object namespaces and Container applications per Preview to prevent state contamination across branches.
- Each Preview has its own stable URL that updates with each push, allowing consistent testing across iterations without affecting production.
- Previews support full observability (logs, errors, metrics, traces) scoped to the branch, enabling autonomous agent-driven testing and debugging.

## FAQ

### How do Worker Previews handle Durable Object isolation?

Each Preview automatically gets a new Durable Object namespace, so state changes, migrations, and sessions are scoped to that branch and do not affect production or other Previews. This prevents a failed migration or bad schema change from impacting live traffic.

### Can I use a custom domain for a Preview?

Yes, Preview URLs can be served on a custom domain so that auth providers, cookies, CORS, and OAuth redirects work the same way they will in production, ensuring consistent behavior during testing.

### How do I configure base settings for all Previews?

You set a base configuration in a previews block in your Wrangler configuration file. This base configuration is copied to each Preview, and you can override specific settings (e.g., database or test API key) per Preview without affecting production or other Previews.

**Tags:** [CI/CD](https://yomu.fyi/topic/ci-cd), [Cloudflare](https://yomu.fyi/topic/cloudflare), [Developer Experience](https://yomu.fyi/topic/developer-experience), [Serverless](https://yomu.fyi/topic/serverless), [Workers](https://yomu.fyi/topic/workers)

- Source: [Cloudflare](https://blog.cloudflare.com/worker-previews)
- Source URL: https://blog.cloudflare.com/worker-previews
- Ingested by Yomu: 2026-09-22T15:00:11.810Z

[Read original post](https://blog.cloudflare.com/worker-previews)
