scanClaudeAliveByWorktree
scanClaudeAliveByWorktree(
worktreePaths,probes?):Map<string,boolean>
Defined in: src/process-reaper.ts:367
Which of the given worktrees currently host a live claude agent process
(comm == “claude”, cwd under the worktree). A single scanProcs() pass with no
per-pid fd reads — cheap enough for a frequent poller sweep. This is the
husk detector herdr’s agent list can’t provide: a claude that exited to a
bare shell keeps its agent listed as idle, but its process is gone from /proc.
Sessions sharing a cwd (non-isolated, same repo) share one verdict — any
claude in the dir counts for all of them.
Returns a Map with every supplied worktreePath as a key (false when no claude).
Parameters
Section titled “Parameters”worktreePaths
Section titled “worktreePaths”string[]
probes?
Section titled “probes?”ReaperProbes = defaultProbes
Returns
Section titled “Returns”Map<string, boolean>