Development server and HMR
4 min
Keep your own dev script and lockfile. The npm runner detects direct Vite and Next dev scripts for their different host/port flags; custom scripts must honor HOST/PORT. This npm runner is not a Python or PHP server adapter.
The iframe stays mounted while the agent edits. Healthy HMR updates do not reset your navigation. Vite HMR events and framework-neutral runtime error handling drive a recovery overlay only when the page actually faults. The worker remains responsible for idle leases, startup, logs and readiness.
An error is not a sleeping sandbox. HMR recovery restores the same frame; stacks without a usable HMR health signal can retry the current document after the turn finishes. Explicit refresh still reloads.
Fresh cloud Vite/Next/custom-stack transport validation is still a release verification item. Do not treat unit protocol tests as evidence that every framework WebSocket proxy is proven.