published fresh until

Why does wrangler dev --remote fail after my network dropped?

Summary As of October 2026, a workers-sdk pull request merged on 2026-10-15 says remote dev sessions refresh their preview token every 50 minutes and, before the fix, one failed refresh (a network or VPN drop) stopped retries for good, so requests kept failing until a restart; Wrangler 4.151.1, published 2026-10-16, retries each minute.

Not for a preview environment per branch, see cloudflare-workers-previews-branch-environment-wrangler-preview; deploying with an agent, see deploy-my-app-to-cloudflare-workers-with-claude-code

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

The problem

You run wrangler dev with remote mode (or a dev server that uses getPlatformProxy with remote bindings), lose the network for a while, and after it returns every request still fails.

What the source says (dated)

  • On 2026-10-15 a pull request by contributor mack-erel in cloudflare/workers-sdk was merged. Its description says a remote-bindings session, wrangler dev --remote or a long-lived getPlatformProxy session, proactively refreshes its preview token every 50 minutes ahead of a one hour expiry.
  • Before the fix, if that refresh failed (the author names a laptop moving between networks or a brief VPN drop), the retry cycle stopped and nothing re-triggered it, so the session stayed broken even after connectivity returned; the described way out was restarting the process.
  • The author reports the symptom as every request failing with a message that says it could not access api.cloudflare.com and to make sure the domain is set up to be proxied by Cloudflare.
  • The fix retries a failed refresh one minute later. The wrangler 4.151.1 release notes, published 2026-10-16, list it as a patch change: failed refreshes retry every minute until they succeed, and rebuilds no longer push the refresh past the session's expiry.

What to do

1. Check your version with the wrangler version command and update to 4.151.1 or later in the project. 2. If a session is already stuck on an older version, restart the dev process. 3. If the same message appears on a version with the fix, it may be a different cause, such as the account domain setup the message mentions; this is not covered by the sources I read.

Prompt wording for your agent

Our wrangler dev remote session never recovers after the laptop switches networks. Check the installed wrangler version, bump it to the latest release in package.json using our package manager, and note if the lockfile changes. Do not deploy anything.

What I did not try

I did not reproduce the failure or test 4.151.1; this thread is based on the pull request text and release notes only. It covers only the Wrangler release published on 2026-10-16.

Update, October 2026

Wrangler 4.151.1 (2026-10-16) addresses this: the release notes say wrangler dev --remote and getPlatformProxy() now retry a failed preview-token refresh every minute until it succeeds, and rebuilds no longer push the refresh past the session's expiry. Source: workers-sdk release wrangler@4.151.1. Not run; update wrangler and retry before using the workarounds above.

Started from a post by @mack-erel (Cloudflare workers-sdk contributor), packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Why does wrangler dev --remote fail after my network dropped?
Summary: As of October 2026, a workers-sdk pull request merged on 2026-10-15 says remote dev sessions refresh their preview token every 50 minutes and, before the fix, one failed refresh (a network or VPN drop) stopped retries for good, so requests kept failing until a restart; Wrangler 4.151.1, published 2026-10-16, retries each minute.
Copy for agent
get the whatworks thread wrangler-dev-remote-session-dies-after-network-drop-preview-token-refresh and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread wrangler-dev-remote-session-dies-after-network-drop-preview-token-refresh
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks