wrangler
4.164.0 · 17 Nov 2026MIT OR Apache-2.049.3M / weekRepositoryHomepagenpmAtom feed
4.167.0 is the newest release of 4.x.
In short
3 new5 fixed2 internal
Release note
Minor Changes
Avoid Worker and workers.dev naming prompts in agent-driven deploys
Wrangler now derives the Worker name from the project and automatically registers the same project-derived workers.dev account subdomain on a first deploy when running in a detected agent environment. The deploy output explains how to change both names.
The experimental build output directory now includes the Worker's configuration at
.cloudflare/output/v0/workers/default/config.jsoninstead of.cloudflare/output/v0/workers/<worker-name>/worker.config.jsonGraduate
wrangler check startupfrom alpha and show bundle size and a local timing summaryThe command no longer prints an alpha warning. It now reports its local profile window, sampled active, garbage collection, and idle time alongside the raw and compressed bundle sizes. The existing measurement warning continues to distinguish these local measurements from startup time measured on Cloudflare.
Add support for dispatching email handlers with
createTestHarnessYou can now call
server.getWorker().email({ from, to, raw })to dispatch directly to a Worker'semail()handler and inspect its outcome, rejection reason, forwarded messages, and replies.const result = await server.getWorker().email({ from: "sender@example.com", to: "inbox@example.com", raw: [ "From: Sender <sender@example.com>", "To: Inbox <inbox@example.com>", "Message-ID: <test@example.com>", "Subject: Test email", "", "Hello from the test harness", ].join("\r\n"), }); expect(result).toMatchObject({ outcome: "ok", forwards: [{ recipient: "archive@example.com" }], replies: [ { sender: "inbox@example.com", raw: expect.stringContaining("Thanks for your email"), }, ], });
Patch Changes
Fix ctrl+c not being able to interrupt wrangler while waiting for Cloudflare Access authorization
When a domain is behind Cloudflare Access (for example during remote bindings startup), wrangler runs
cloudflared access login, which only returns once the user completes the authorization flow in the browser. This was invoked synchronously, blocking Node's event loop, so wrangler could not react to ctrl+c (or anything else) until the authorization completed — abandoning the browser flow left a hung wrangler process that had to be killed externally.cloudflaredis now spawned asynchronously, keeping wrangler responsive while it waits. The remote runtime passes its abort signal through to the spawn, so tearing down the session kills a still-pendingcloudflaredimmediately, with process exit as a last-resort cleanup.Include the local observability query endpoint in the agent-facing Local Explorer hint
The hint
wrangler devprints for AI-agent sessions now listsPOST /cdn-cgi/explorer/api/local/observability/query, so agents can discover the read-only SQL endpoint for captured request traces and console logs (thespansandlogstables) alongside the existing binding and storage routes.Improve the agent-facing Local Explorer hint for the observability query endpoint
When a
wrangler devsession is detected as running inside an AI agent, the hint forPOST /local/observability/querynow explains that the endpoint takes a read-only SQL query (SELECT/WITH only) over the capturedspansandlogstables, notes thatattributesis JSON (read viajson(attributes)), and includes a copy-pasteablecurlexample. The full OpenAPI schema is demoted to a last-resort footer so agents reach for the small, actionable example first instead of fetching the large schema.Fix
wrangler triggers deployto use Vite-generated redirected configurationThe command now reads
.wrangler/deploy/config.json, matchingwrangler deployandwrangler versions upload, so generated Worker names and trigger settings are applied.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.