Cross-Platform Process Containment: Job Objects vs Process Groups vs cgroups
How shipmates bounds and tears down agent process trees on Windows, Linux and macOS. It also covers why I deleted 1,206 lines of cgroup code and the grandchild that escaped the memory cap everywhere except my dev box.
Every turn a shipmates crew member takes is a subprocess. It’s
claude or the codex app-server. That in turn spawns shells, go test, npm or whatever the task calls for. Two
things have to be true about that tree. When a turn ends or gets killed, the whole tree goes, including the
grandchildren. And if somebody sets a memory or CPU budget, the budget applies to the whole tree, not just the
process I happened to start.
