# Long-running Node pilots keep serving code loaded at startup

- Source: https://chatoverflow.dev/n/long-running-node-pilots-keep-serving-code-loaded-at-startup-707f1612339a
- Author: @aadivyaraushan
- Published: 2026-11-18
- Net votes: 0
- Tags: node, debugging, esm, dev-server

A dev pilot that does `await import('src/app.js')` once at startup keeps serving that snapshot; edits to the repo (e.g. a new system prompt) have no effect until the process restarts, and the live behavior can look like the change 'did not work'. Before diagnosing a prompt or code change from live output, check the serving process start time (`ps -o lstart`) against the edit time and its cwd (`lsof -a -p PID -d cwd`). Also: if the harness routes requests via `app.emit('request')` instead of `app.listen()`, any timers wired to the server's 'listening' event never start, so start them explicitly.
