2026-05-08 — Local dev uses `wrangler dev --remote`, not mixed-mode
2026-05-08 — Local dev uses wrangler dev --remote, not mixed-mode
Section titled “2026-05-08 — Local dev uses wrangler dev --remote, not mixed-mode”Decision
Section titled “Decision”scripts/dev-up.sh runs wrangler dev --remote --port 8787. The Worker executes on the Cloudflare edge against the dev account’s real DB_CONSOLE, DB_AGGREGATE, and AUTH bindings. The local wrangler dev process is a console + log tail; there is no workerd running on the laptop.
This diverges from the planning project at /Users/jlambert/Documents/Claude/Projects/Adventive Engineering/docs/projects/local-dev-public-api/, which specified mixed-mode (experimental_remote = true per binding). The plan was wrong on a load-bearing detail.
Why mixed-mode doesn’t work
Section titled “Why mixed-mode doesn’t work”Empirically tested on Wrangler 4.84.1 (the version pinned in package.json) and Wrangler 4.90.0 (the latest at the time of writing):
experimental_remote = trueandremote = trueare both flagged as “unexpected fields” on[[hyperdrive]]bindings. Wrangler silently drops the field.- With the field dropped,
wrangler devfalls through to its local-emulation path, which for Hyperdrive demands a PostgreslocalConnectionString. Adventive’s Hyperdrive bindings are MySQL. wrangler dev --helpon 4.90.0 lists only two mode flags:--remote(everything remote) and--local(everything local). There is no per-binding mixed-mode flag in the CLI either.
Cloudflare may yet add this feature; if/when they do, this decision should be revisited and the toolkit can switch back to mixed-mode for the iteration-speed gains it would bring.
Trade-offs we are accepting
Section titled “Trade-offs we are accepting”- Slower iteration. Each
wrangler devstartup pushes the Worker to the edge (~30 s on a good network). Hot-reload after a save is also slower than local workerd would be. - No native debugger. The Worker runs at the edge, so node/V8 debugger attach does not apply. Engineers debug via
console.logand thewrangler devlog tail. - Network-dependent. Offline development is not possible.
- One Worker instance per engineer for the daily loop. Concurrent
wrangler dev --remotesessions can run, but they share the same dev account quota.
Trade-offs we are not affected by
Section titled “Trade-offs we are not affected by”- OTel emission: still gated by
OTEL_ENABLED=falsein.dev.vars(seedecisions/2026-05-08-otel-off-on-laptops.md). Fully-remote mode does not change this —.dev.varsis still passed through to the edge-side preview. - Per-engineer Worker (
dev-deploy.sh) flow: unaffected. The[env.personal]block stays exactly as designed.
Plan reconciliation
Section titled “Plan reconciliation”Source-of-truth files at docs/projects/local-dev-public-api/ retain the mixed-mode design. Future re-implementations (or a sync of the plan to reality) should:
- Update
02-code-updates.mdto drop theexperimental_remote = trueclaim and switch the spec towrangler dev --remote. - Update
04-runbook.mdso--remoteis the documented daily-loop mode, not labeled “rare”. - Note that the Wrangler version is not the constraint — the feature simply does not exist for Hyperdrive bindings at this time.
The implementation in this repo is the source of truth until the plan is reconciled.