Cline Runtime Orchestrator: Lifecycle Management & Health Probing
Cline's desktop runtime now intelligently manages lifecycle in attach and owned modes, with health probing and crash detection. Supports both external runtimes and spawned child processes.
TL;DR
- Runtime lifecycle now handles both attach mode (external runtime) and owned mode (spawned child process)
- Health probing with configurable intervals detects crashes and transient failures
- New API: connect(), restart(), shutdown(), getUrl() for runtime control
New
- Attach mode — connects to an already-running runtime at 127.0.0.1:3484 with configurable health probe intervals and failure thresholds
- Transient-failure reset window — automatically recovers from temporary hiccups without triggering a full crash event
- Owned mode — spawns and manages the runtime as a child process, delegating lifecycle to RuntimeChildManager
- Crash detection — emits 'crashed' event when runtime becomes unreachable in attach mode or via child manager in owned mode
- Runtime control API — connect() boots or attaches, restart() gracefully reconnects, shutdown() stops owned runtime, getUrl() returns current endpoint
Depends on: PR #372a (window primitives). Next: PR #372c (protocol handling + main wiring).
Source: Cline