Headroom: always-on proxy (not on-demand)
Headroom: always-on proxy
Decision
Headroom runs as a long-lived background process, started at user login and kept alive. Not on-demand spawned per invocation. Idle RAM cost (~30-60 MB) is accepted in exchange for zero cold-start on every call.
Why
User locked this on 2026-06-26 (Q7). Cold-start latency compounds badly across the high-frequency call paths (every userscript HTTP call, every Claude tool call). Persistent process is cheaper net even with idle RAM.
How to apply
- Single supervised process; restart on crash (Task Scheduler "restart on failure" or PM2-style supervisor).
- Listens on fixed loopback port + named pipe for MCP.
- No per-invocation fork/exec for the proxy itself — only the upstream backend may be lazy.
- Health endpoint at
/healthzfor monitoring. - See
task-scheduler-at-login-2026-06-26for autostart wiring.
Captured
2026-06-26 session, Q7 of 24-question grill.