Systemd Vs Claude

AI Use Disclosure

The ideas here are my own. I use AI tools in various parts of the writing process, including summarizing my notes and prompts, improving grammar, tightening wording, and checking whether an argument is clear. These posts are as much notes for myself as they are for anyone else who is interested.

Nobody thought to ask if we should.

What if we gave an AI agent the job of init? Start services. Handle signals. Reap dead children. Decide when to shut down.

So we built pid1.

A 281-line C adapter runs as PID 1 inside a container. Pi runs beside the workloads and makes the decisions. The adapter sends it kernel signals and runs the syscalls it requests. It does not restart services, forward signals, or reap children on its own.

A shutdown looks like this:

SIGTERM → model → signal(workload, SIGTERM) → wait() → exit(0)

The model can call poll_next() to wait for input. It can also enter a critical_section that queues new events until it ends the section. Processes keep running. Forget to end it, and the agent can get stuck.

Despite the title, the live test used GPT-6.1 Sol through Pi, not Claude. It started a workload, received SIGTERM, stopped and reaped the workload, then exited the container. That proves the wiring works. It does not prove this is a good init system.

If the agent dies, PID 1 stays alive and does nothing. If inference takes too long, the container runtime may kill it first. Workloads share the container’s files and credentials. This is not a sandbox for hostile code.

Yes, this is a joke. Use at your own risk.

Systemd can keep the job.

First written: 2026-10-19
Last edited: 2026-10-19