What this thread does
The problem
You want every branch or agent task to get its own live URL so you can click through the change before merging. On Workers the easy way to get one can still point at your production data.
What the sources say
Cloudflare's Previews overview (read 17 October 2026) describes isolated, production-like copies of a Worker, one per branch, each with its own variables, secrets, bindings, URL and observability. The page does not say whether the feature is beta.
- Create:
npm i -D wrangler@latest(Worker Previews requires Wrangler 4.135.0 or later; project commands do not use a newer global install), thennpx wrangler preview(the name defaults to the current Git branch) ornpx wrangler preview --name <PREVIEW_NAME>. Config goes in apreviewsblock of the Wrangler config. Production still usesnpx wrangler deploy. - URLs:
<preview-name>-<worker-name>.<subdomain>.workers.devalways serves the latest deploy; each deployment also gets a fixed Deployment URL. - PR links: run the same command in your CI, or connect the repo to Workers Builds with preview builds to post URLs on PRs; existing Workers using Workers Builds need a one-time setup.
- Isolation, per the resources page: Durable Objects are isolated automatically; KV, D1, R2, Queues and Secrets Store are shared by default when the binding points to the same id, database_id, bucket_name, queue name or secret. Bind different ones in the
previewsblock to isolate. Limitations: a Preview of Worker A binds to production Worker B (not a Preview of B); Queue consumers do not run in Previews (messages a Preview sends to a production queue are consumed by production); Cron Triggers do not fire; production routes and custom domains target production only; Workflows and Containers have caveats. - Public by default: Cloudflare's own
wrangleragent skill (cloudflare/skills at commit 86505e44f87d801aa1864a3c4109e9a8ae5c409f) tells the agent to say that Preview URLs are public unless access controls are configured, and not to infer isolation from the Preview name or allow writes to production resources unless you intend it. The Previews overview itself also states "Preview URLs are public by default" and points to Cloudflare Access for requiring sign-in (checked 18 October 2026).
How to describe it to your agent
Add apreviewsblock to our Wrangler config and runnpx wrangler previewfor this branch. First list every binding (KV, D1, R2, Queues, secrets, service bindings) and say whether the Preview would share it with production. Bind separate test resources for anything that writes. Tell me the Preview URL is public and wait for my decision on access control. Do not deploy to production.
Mistakes to check
- Assuming a Preview has its own D1 or R2 because it has its own URL.
- A queue producer in a Preview feeding the production consumer.
- Testing scheduled logic in a Preview (cron does not fire; test via a route).
- Sharing a Preview link publicly: a related thread shows a shared preview URL being crawled on another host.
- Wrangler pinned below 4.135.0 in the project.
Limits
I did not run wrangler preview. The overview did not mention beta status, so confirm that before relying on it. (It does say Preview URLs are public by default.) Related thread: Cloudflare cost guardrails.
Primary source
Primary sources: Previews overview and Previews resources (Cloudflare, read 18 October 2026). Checked: Wrangler 4.135.0 or later, npx wrangler preview for the current branch, the previews config block, the workers.dev Preview and Deployment URL formats, "Preview URLs are public by default" (this corrects the earlier claim that the overview says nothing on access); Durable Objects and Containers get new resources automatically; KV, D1, R2, Queues and Secrets Store are shared when the binding points at the same resource; service bindings go to the production Worker; Queue consumers do not run in Previews; Cron Triggers target production; Previews do not take over zone routes; Workflows share instances and Container support is partial. The Get started guide confirms that the default Preview name is the Git branch name and Workers Builds can post PR URLs (checked 2026-11-15). Not verified: the Cloudflare wrangler agent skill commit.
Started from a post by @Cloudflare, packaged by the editor. Original post