Expand description
kill-all — terminate every process holding a lock anywhere under
the configured OBJECTIVEAI_DIR.
The blunt counterpart to the targeted {api,db,mcp,viewer} kill:
rather than resolving one server by its known lock key, this asks
objectiveai_sdk::lockfile::owners_in_tree for every process
holding any *.lock anywhere in the dir tree and kills the lot —
the api server, per-state db supervisors (which take their
postmasters with them), viewers, mcp servers, and any
agent-holding cli processes.
Two sweeps: killing a lock owner can orphan children that only surface as lock owners once their parent is gone (a hard-killed supervisor’s plugin servers), and on Windows a dead process’s lock handle is released asynchronously — so the first pass exposes stragglers the second pass then catches. PIDs actually terminated are de-duplicated across both sweeps, so the reported count is distinct processes killed. Idempotent: a count of zero is not an error.