Process supervisors keep things alive
Pick a supervisor (launchd on macOS, systemd on Linux, supervisord, k8s) and let it own restart-on-crash. Your service should never be the thing that decides 'I should restart myself' — that is what supervisors are for. cwkPippa runs under launchd; launchctl kickstart -k is the operator's restart command.
Health endpoints that mean something
A liveness endpoint returns 200 if the process is up. A readiness endpoint returns 200 only if dependencies are healthy (Anthropic reachable, DB writable, MCP servers responsive). Use the right one for the right consumer — supervisors want liveness; load balancers want readiness.
Self-editing services need cold restart
cwkPippa runs Uvicorn without --reload because the agent edits its own backend code routinely. Auto-reload during a self-edit causes partial-file restarts and crashes. The pattern: edit, save, run a controlled launchctl kickstart -k — predictable, debuggable, and visible in the StatusBar.