Skip to main content

classify

Function classify 

Source
pub fn classify(lock_path: &Path) -> AgentStatus
Expand description

Classify the agent’s running state by inspecting <home>/running.lock.

  • No lock → Stopped
  • Lock present, parses, pid alive → Running
  • Lock present but pid not alive (crash / SIGKILL / OOM) → Stale
  • Lock present but unparseable / unreadable → Stale with pid: None (treat as stale rather than running so dashboards don’t paint dead agents green)