Session Finder
Which AI agents are running right now, and what do you do about them.
Commands
python3 scripts/session_finder.py # one-shot scan
python3 scripts/session_finder.py --json # machine-readable
python3 scripts/session_finder.py --watch 10 # re-scan every 10s
python3 scripts/session_finder.py --kill 85819 # SIGTERM (validated)
python3 scripts/session_finder.py --match "my-custom-agent"
Detection
Process-level via ps: matches command lines against known agent patterns
(claude, codex, omo/senpi, gajae-code, hermes, opencode, aider, cursor,
gemini). Excludes itself, greps, and the agent-skills test harness. Groups
by client with per-process PID, parent PID, uptime, and command.
Safe kill
--kill PID validates the PID against a fresh detection scan before sending
SIGTERM — it refuses any process that does not match an agent pattern, so
you cannot accidentally kill a system process. SIGTERM only (no SIGKILL);
a hung agent that ignores SIGTERM is your call to handle manually.
Pairs with
session-handoff (read the logs of sessions you found here),
usage-audit (token accounting for those same clients),
session-rules (corrections from those sessions).