Watch
0
0
Fork
You've already forked hyperhive
0

hive-agent-sock: kill what a subagent run leaves in its cgroup after it ends

This commit is contained in:
damocles 2026-11-18 13:32:26 +01:00 • committed by mara
commit 2689efebcf

View file

@ -44,6 +44,8 @@ a crate of its own.
`hive-bash-mcp` puts each bash task in `<unit>/tasks/<id>/` and
`hive-subagent-mcp` each subagent run in `<unit>/runs/<name>-<n>/`, both with
`memory.oom.group=1`, so the OOM killer takes one whole run and leaves the
daemon alone. Both daemons are delegated their cgroup with `Delegate=memory
daemon alone. A subagent run's cgroup is also killed (`cgroup.kill`) if
processes are still in it 30 seconds after the run ended; a bash task's is
left alone. Both daemons are delegated their cgroup with `Delegate=memory
pids` and `DelegateSubgroup=daemon` (`nix/agent-modules/mcp.nix`); outside such
a unit the module logs one warning and runs stay in the daemon's cgroup.