Dev Process Supervision & Health Diagnostics

Published Updated
Monitors and terminates CLI dev server sessions via HTTP health probes and port/directory matching.

Active HTTP Health Probing

air dev list queries DevSessionRegistry and issues non-blocking GET http://127.0.0.1:<port>/health probes with an 800ms timeout across registered workspace sessions. Processes that still hold an open TCP socket after an event-loop stall or crash fail the probe and are flagged as [UNRESPONSIVE] so developers can clear stale ports cleanly.

Multi-Strategy Session Resolution

air dev stop locates the target server using three fallback strategies: explicit port flag (-p <port>), matching project directory path (-d <dir>), or single-session fallback when only one dev server is active. Pass -f or --force when terminating an [UNRESPONSIVE] process that ignores graceful shutdown signals.

CLI Supervision Commands & Flags
Command / FlagBehavior
air dev listLists registered dev servers and probes /health (800ms timeout).
air dev stop -p <port>Stops the dev server bound to a specific port (required in multi-workspace setups).
air dev stop -d <dir>Stops the dev server matching the specified project directory.
-f, --forceForce-kills an [UNRESPONSIVE] process that holds a port but fails /health.
dev-supervision.sh (bash)
air dev list
air dev stop -p 9005 --force
Inspect active dev servers and terminate a stalled port.