Overview
Every agent execution runs inside a sandbox that enforces resource limits and isolation policies. These settings control how much compute, memory, network access, and filesystem access an agent is allowed.Memory limit
| Setting | Variable | Default |
|---|---|---|
| Memory cap | EXECUTOR_MEMORY_LIMIT_MB | 512 |
oom_kills_total metric.
Setting this too low causes frequent OOM kills on compilation-heavy workloads. Setting it too high risks one runaway agent starving others on multi-concurrency workers.
CPU limit
| Setting | Variable | Default |
|---|---|---|
| CPU cap | EXECUTOR_CPU_LIMIT_PERCENT | 100 |
100 means one full core. 50 means half a core. The limit prevents a single agent from monopolizing the machine.
Network policy
Network policy is hardcoded in the executor’s sandbox layer (network.zig). There is no environment variable to configure it. The default policy denies all egress.
Two policies exist in the codebase:
deny_all
All outbound network access is blocked. The agent cannot reach the internet. This is the default and the most secure option. Suitable for workloads where all dependencies are pre-installed or vendored.registry_allowlist
Outbound access is permitted only to a predefined list of package registries:| Registry | Hosts |
|---|---|
| npm | registry.npmjs.org |
| PyPI | pypi.org, files.pythonhosted.org |
| crates.io | crates.io, static.crates.io |
| Go modules | proxy.golang.org, sum.golang.org |
Filesystem policy
Filesystem isolation uses Landlock (Linux 5.13+). The policy is applied per-execution and cannot be changed by the agent.| Path | Access | Purpose |
|---|---|---|
| Workspace directory | Read-write | The cloned repo where the agent works. |
/usr, /lib, /bin | Read-only | System binaries and libraries needed for compilation. |
/tmp (private) | Read-write | Temporary files via PrivateTmp. Not shared with other processes. |
| Everything else | Denied | No access to host filesystem, other workspaces, or system config. |
Kill grace period
| Setting | Variable | Default |
|---|---|---|
| Grace period | SANDBOX_KILL_GRACE_MS | 5000 |
SIGTERM and waits for the grace period before sending SIGKILL. This gives the agent time to flush partial results.