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
5 new9 fixed2 internal
Release note
Minor Changes
Add namespace support to
wrangler ai-searchcommandsAll
wrangler ai-searchinstance commands (create,list,get,update,delete,stats,search) now accept a--namespace(or-n) flag to target a specific AI Search namespace. When the flag is omitted, commands default to thedefaultnamespace that Cloudflare automatically provisions for every account.wrangler ai-search listnow displays anamespacecolumn, andwrangler ai-search createoffers an interactive picker for existing namespaces (with an option to create a new one) when--namespaceis not supplied in an interactive session.A new
wrangler ai-search namespacesubcommand group is also introduced, withlist,create,get,update, anddeletesubcommands for managing namespaces directly.wrangler ai-search list --namespace blog wrangler ai-search create my-instance --namespace blog --type r2 --source my-bucket wrangler ai-search namespace create blog --description "Blog content"
Add
--tunnelflag towrangler devfor sharing your local dev server via Cloudflare Quick TunnelsYou can now expose your local dev server publicly by passing
--tunnel:wrangler dev --tunnel
This starts a Cloudflare Quick Tunnel that gives you a random
*.trycloudflare.comURL to share. The tunnel stops automatically when the dev session ends. Quick tunnels don't require a Cloudflare account or any configuration.A warning is shown when Server-Sent Events (SSE) responses are detected through the tunnel, since quick tunnels don't support SSE.
wrangler tailwill now log stack traces. These stack traces already include resolved frames if you have chosen to upload sourcemaps.Force Flagship bindings to always use remote mode in local dev
Flagship bindings now always access the remote Flagship service during local development, matching the behavior of AI bindings. Previously, Flagship supported both local and remote modes, but the local stub only returned default values, providing no real functionality and creating a dual source of truth for flag evaluations.
The
remoteconfig field is retained for backward compatibility but only controls whether a warning is displayed. Settingremote: truesuppresses the warning that Flagship bindings always access remote resources and may incur usage charges in local dev.Add
wrangler queues consumer listsubcommands for listing queue consumersThree new commands are available for listing consumers on a queue:
wrangler queues consumer list <queue-name>— lists all consumers (both worker and HTTP pull), grouped by typewrangler queues consumer worker list <queue-name>— lists only worker consumerswrangler queues consumer http list <queue-name>— lists only HTTP pull consumers
Patch Changes
Restore telemetry tracking for common CLI flags that were unintentionally dropped during sanitisation
When argument sanitisation was introduced, only explicitly allow-listed args had their values included in telemetry. The allow list was very conservative, which meant common boolean flags like
--remote,--json,--dry-run,--force, and many others were no longer being captured insanitizedArgsdespite previously being tracked. Boolean flags are inherently safe (values are onlytrue/false), so these have now been added back to the global allow list. A small number of fixed-choice args (--local-protocol,--upstream-protocol,--containers-rollout) have also been added with their known value sets.Fix service binding and tail consumer
propsbeing dropped between workers in different local dev instancesWhen a service binding or tail consumer configured with
propstargeted a worker running in a separatewrangler devinstance (via the dev registry), thepropswere silently dropped and the remote entrypoint saw an emptyctx.props. Props are now forwarded correctly across the dev registry boundary, matching the behavior users get when all workers run in a single instance.// wrangler.json { "services": [ { "binding": "AUTH", "service": "auth-worker", // may be in a separate `wrangler dev` process "entrypoint": "SessionEntry", "props": { "tenant": "acme" } } ] }The target worker's
SessionEntryentrypoint now correctly receives{ tenant: "acme" }onctx.propsregardless of which local dev instance it runs in.Fix three resource leaks in
unstable_startWorkerteardown that could prevent Node from exiting cleanly afterworker.dispose().The esbuild context created by
bundleWorkeris now disposed when the initial build fails. Previously a failing initial build (e.g. an unresolvable entrypoint, or a worker started with an invalid config viasetConfig) left the esbuild child process running for the lifetime of the parent Node process.runBuild's cleanup function now awaits the in-flight build before running the bundler's stop handler. Previously teardown could return beforeesbuild.BuildContext.dispose()had been called, so the esbuild watcher kept the event loop alive after dispose had resolved.BundlerController.teardown()now runs the esbuild cleanup before removing the bundler's temporary directory, and aborts the in-flight bundle build so it cannot emit stalebundleStart/bundleCompleteevents after teardown. Previously the tmpdir was removed first, which in race with an in-flight rebuild produced confusing "Could not resolve.wrangler/tmp/bundle-XXXX/middleware-loader.entry.ts" errors during dispose.
Stop emitting a misleading
[wrangler:error] Docker build exited with code: <n>log when the user aborts an in-progress container image build (for example by pressing therrebuild hotkey while the previous build is still running).The abort-detection branch in the local and multi-worker runtime controllers was matching the wrong error message — it checked for
"Build exited with code: 1", but the error thrown by the docker build helper is actually"Docker build exited with code: <n>", and the exit code after a process-group SIGINT/SIGKILL is typically130/137/143, not1. As a result, every legitimate user-initiated rebuild abort produced a spurious error event and[wrangler:error]log line. The check now matches the real error message prefix and ignores any non-zero exit code from the aborted build, so a user-requested rebuild while another build is in progress is silent.Preserve auth in remote proxy session data to avoid unnecessary session restarts
maybeStartOrUpdateRemoteProxySessionwas not includingauthin its return value, so on subsequent callspreExistingRemoteProxySessionData.authwas alwaysundefined. This caused the auth comparison to always detect a change, disposing and recreating the remote proxy session on every reload even when auth had not changed.wrangler types --checkno longer throws when the types file was generated with an explicit boolean flag. Previously, yargs would parse such flags as actual booleans rather than strings, causing an internal parse error.Fix the
wrangler tailcommand leaking a signal-exit listener after the tail has been cleanly closed.The tail command registered both a
tail.on("close", exit)listener and a process-levelonExit(exit)handler, but never removed the latter afterexit()had run. In long-lived CLI processes this is harmless — the handler eventually runs once on shutdown — but in unit tests that repeatedly invokewrangler tail, every invocation accumulates a handler that fires during test-runner shutdown. Those late invocations calldeleteTail()after the test's auth mocks have been torn down, producing spurious "Not logged in" unhandled rejections which fail the Linux CI runs.The handler is now removed as soon as
exit()runs, andexit()is guarded against re-entry so it is idempotent if both the WebSocketcloseevent and a real signal fire for the same session.Recognize Hydrogen as a known unsupported framework in autoconfig
Previously, Hydrogen projects were incorrectly identified as React Router (since Hydrogen uses React Router under the hood), leading to a confusing autoconfig experience. Hydrogen is now recognized as a distinct unsupported framework, so users see a clear message that Hydrogen is not yet supported instead of being guided through React Router configuration.
Prioritise
CLOUDFLARE_ACCOUNT_IDover a cached account id for all Pages commandsPreviously, some Pages commands (
pages deploy,pages deployment list/delete/tail,pages download config,pages secret) used a cached account id over theCLOUDFLARE_ACCOUNT_IDenvironment variable. Thepages projectcommands already correctly prioritisedCLOUDFLARE_ACCOUNT_ID.
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.