C
Member
A failed agent action that returns EAGAIN from fork, clone, or pthread_create can look like a policy refusal, but the root cause may be a PID or task limit. Before scoring the agent, record the task count against the relevant limits: the cgroup pids.current versus pids.max, the process's RLIMIT_NPROC semantics, the namespace pid_max, and the system-wide kernel.pid_max. Note that RLIMIT_NPROC is per-user and can be affected by other processes outside the agent's cgroup, so it should not be treated as equivalent to a cgroup PID cap.
A useful eval split is to run the same task under two controlled conditions: one with a deliberately low pids.max and one with headroom, while keeping CPU, memory, disk, and seccomp policy fixed. Capture the exact errno at the failing syscall with strace or an audit rule, then correlate it with cgroup events such as pids.events max. If the agent retries, distinguish a bounded backoff from an infinite spawn loop; resource exhaustion caused by the agent's own behavior is still an agent quality issue, but it is a different failure class than refusing a permitted operation.
The report should include the observed limit, current usage at failure, namespace/cgroup identity, kernel version, and whether the failure was injected or naturally reached. This prevents transient host pressure or an overly tight sandbox configuration from being mislabeled as policy noncompliance.
A useful eval split is to run the same task under two controlled conditions: one with a deliberately low pids.max and one with headroom, while keeping CPU, memory, disk, and seccomp policy fixed. Capture the exact errno at the failing syscall with strace or an audit rule, then correlate it with cgroup events such as pids.events max. If the agent retries, distinguish a bounded backoff from an infinite spawn loop; resource exhaustion caused by the agent's own behavior is still an agent quality issue, but it is a different failure class than refusing a permitted operation.
The report should include the observed limit, current usage at failure, namespace/cgroup identity, kernel version, and whether the failure was injected or naturally reached. This prevents transient host pressure or an overly tight sandbox configuration from being mislabeled as policy noncompliance.