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
2 new11 fixed3 internal
Release note
Minor Changes
Add restart-from-step options to
wrangler workflows instances restartYou can now restart a Workflow instance from a specific step using
--from-step-name, with optional--from-step-countand--from-step-typedisambiguation. These options work for both remote Workflow instances and localwrangler dev --localsessions.
Patch Changes
Add re-authentication hint to account fetch error messages
When Wrangler fails to automatically retrieve account IDs, the error messages now suggest running
wrangler loginas a troubleshooting step. This addresses confusion for users who encounter these errors after OAuth system changes or other authentication issues.Gracefully handle EMFILE error when assets directory exceeds OS watcher limit
Previously, when
wrangler devwas pointed at an assets directory with more than ~4,096 subdirectories, the chokidar file watcher threw anEMFILE: too many open fileserror that was not caught, causing an infinite error loop that made the dev server unresponsive.Now the error is caught and wrangler:
Logs a clear warning explaining the platform watcher limit was hit
Recommends reducing the number of subdirectories by flattening or restructuring the assets directory
Disables the assets watcher gracefully so the dev server continues working without hot-reload
Fix
wrangler completeprinting the AI skills prompt into shell completion outputPreviously, running
eval "$(wrangler complete zsh)"(or any other shell) would fail with errors likezsh: command not found: --install-skillsbecause the interactive AI agent skills installation prompt was included in the completion script output.The skills prompt is now skipped when running
wrangler complete, so the generated completion script is clean and can be sourced correctly.Show a clear error when
--metadatais not valid JSON instead of silently ignoring the valueFix
wrangler deploy --upload-source-mapssilently skipping source maps when the entry file ends with magic comments after//# sourceMappingURL=Wrangler previously assumed the
//# sourceMappingURL=comment was the last non-empty line of a module. Tools likesentry-cli sourcemaps injectappend a//# debugId=comment after it, which silently caused source maps to be omitted from the upload form, most commonly when deploying with--no-bundle --upload-source-maps. Wrangler now scans trailing magic comments (lines starting with//#or//@) and detects the//# sourceMappingURL=comment regardless of which other magic comments follow it.Remove trailing periods from URLs in terminal output
URLs printed to the terminal with a sentence-ending period (e.g.
https://example.com/path.) would include the period when clicked in some terminal emulators, causing 404 errors. This removes trailing periods from all URLs displayed in CLI output across wrangler, miniflare, vitest-pool-workers, and workers-utils.Fix Workflows
schedulesdeploy payload to match the control plane APIWhen deploying a Workflow with a
schedulesbinding property, Wrangler sent the cron expressions as a list of strings. The Workflows API expects a list of objects of the form{ cron: string }, so the request was rejected. Wrangler now maps each configured cron expression to{ cron }(normalizing a single string or an array) when building the request. The user-facing config still accepts a string or an array of strings.Fix JSON variable bindings in
wrangler init --from-dashand remote config diffWhen fetching a remote Worker's configuration, JSON variable bindings (e.g.
{"my_value": 5}) were incorrectly serialized as{ "name": "MY_JSON", "json": {"my_value": 5} }instead of{ "MY_JSON": {"my_value": 5} }. This affected two areas:wrangler init --from-dashwould generate awrangler.jsonwith brokenvarsentriesRemote config diff checks would always report JSON bindings as changed, since the malformed remote representation could never match the local config
Both issues are now fixed and remote JSON bindings are now correctly mapped.
Include agent skill installation status in all telemetry events
The agent skill installation status is now consistently included in all telemetry events, not just a subset of them.
Move fetch helpers into
@cloudflare/workers-utilsShared Cloudflare API fetch helper types and plumbing now live in
@cloudflare/workers-utilsso Wrangler and other clients can use the same implementation.Pin non-bundled runtime dependencies to exact versions
Dependencies that are not bundled into a package's published output are installed directly into consumers' dependency trees, so they are now pinned to exact versions instead of semver ranges. This closes a supply-chain gap where an unpinned external dependency could resolve to a compromised upstream release on a fresh install. A new
pnpm check:pinned-depslint enforces this for all published packages (and for the shared pnpm catalog) going forward.Fix
wrangler secret bulkdropping newlines from.envinput read from stdinPreviously,
.envinput piped through stdin was concatenated without line breaks, so only the first secret could be parsed correctly. Stdin input now preserves line separators before parsing.
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.