Skip to main content

Module process

Module process 

Source
Expand description

Process enumeration and classification.

sysinfo gives us the flat process table; this module decides which processes are agent roots, which are MCP servers, and folds the table into per-agent trees. Everything here is heuristic and documented as such in ADR-002; the harness registry (see harness::claude) is preferred when it exists.

Structs§

ProcessScanner
RawProc

Functions§

build_forest
Fold the flat table into a forest of agent trees plus the orphaned MCP list.
classify_agent
Is this process the root of a coding agent? Which harness?
classify_child
Classify a non-root process by what it looks like.
looks_like_mcp
MCP servers have no wire-level marker visible from the process table, so this is purely a naming heuristic. False negatives are expected; ADR-002 lists the known ones and RFC-102 proposes a registry-based replacement.
session_id_from_args
Extract --resume <id> / -r <id> style session ids from a command line.