Understand Process Controls
OpenShell limits the capabilities available to managed sandbox processes. NemoClaw entrypoints retain only direct root-to-user transitions and resource-limit hooks for the paths that still consume them.
OpenShell enforces additional process-level controls not covered here, including seccomp BPF socket domain filters and a specific enforcement application order (namespace entry, privilege drop, Landlock, seccomp). Refer to the Process Controls section of the OpenShell Security Best Practices.
Capability Ownership
OpenShell owns capability enforcement for managed agent processes. The OpenClaw and Hermes entrypoints do not inspect, drop, record, or reconcile Linux capabilities. This keeps one enforcement owner for the entrypoint, later exec processes, and connect shells.
A direct container runtime can explicitly override the image user to root.
That compatibility path retains the existing capsh bounding-set drop and supports NEMOCLAW_REQUIRE_CAP_DROP=1 for fail-closed verification.
It is not used by OpenShell-managed launches and is not a substitute for container-runtime capability configuration.
The managed images install setpriv from util-linux and require it when the entrypoint switches from root to the sandbox and gateway users.
When CAP_SETPCAP is available, the same setpriv operation removes the remaining privilege-separation capabilities from the child process at the same time as the user change.
That direct root-to-user transition is separate from managed OpenShell enforcement and removes cap_setuid, cap_setgid, cap_fowner, cap_chown, and cap_kill from the child bounding set when the runtime permits it.
For root-to-user transitions, the extra bounding-set capability drop is best effort.
If capsh or CAP_SETPCAP is unavailable, the root entrypoint logs a warning and uses setpriv without the extra bounding-set drop.
When a root entrypoint must change identity, it fails closed if setpriv is unavailable instead of starting an agent service as root.
Gateway Process Isolation
The stock Deep Agents image defaults to the sandbox user.
The managed-image publication workflow also sets the OCI default user to sandbox for OpenShell 0.0.116.
Deep Agents does not use a separate agent gateway UID in this topology.
No New Privileges
The no-new-privileges flag prevents processes from gaining additional privileges through setuid binaries or capability inheritance.
Process Limit
A process limit caps the number of processes the sandbox user can spawn.
The entrypoint sets both soft and hard limits using ulimit -u 512.
This behavior is best effort.
If the container runtime restricts ulimit modification, the entrypoint logs a security warning and continues without the limit.
Open File Descriptor Limit
An open file descriptor limit caps the number of files, sockets, and pipes the sandbox user can hold open at once.
The entrypoint sets both soft and hard limits using ulimit -n 65536.
This behavior is best effort.
If the container runtime restricts ulimit modification, the entrypoint logs a security warning and continues without the limit.
Deep Agents Resource Limit Enforcement
Managed Deep Agents uses stricter enforcement than the best-effort entrypoint behavior described above.
The managed Deep Agents image applies the 512-process and 65,536-file-descriptor caps to the long-running sandbox entrypoint tree and to direct managed dcode launches.
During Docker-driver onboarding, NemoClaw also configures the container with nproc=512:512 and nofile=65536:65536 limits so the managed entrypoint and fresh exec or connect processes start under the same hard caps.
The container-level limits and managed startup command remain in effect when you stop and start the sandbox or restart the OpenShell gateway.
It also applies and verifies the caps in Bash login and interactive shells because fresh openshell sandbox exec and connect shells do not inherit the dcode entrypoint child’s lowered limits.
For managed Deep Agents, successful verification requires both the soft and hard limits to equal 512 processes and 65,536 file descriptors; a lower inherited file-descriptor default such as 1,024 is not accepted as successful hardening.
If the image-baked resource-limit helper is missing or the effective limits do not match policy after hardening, the Deep Agents entrypoint and direct managed launcher refuse to start. The entrypoint and launcher complete this verification before proxy setup or user-supplied commands run.
A login or interactive shell remains available when the helper is missing or its limits cannot be verified, but it prints [SECURITY] Sandbox resource limits were NOT hardened for this shell.
OpenShell creates those fresh exec and connect processes outside the entrypoint tree, so an image layer cannot make them inherit the entrypoint child’s lowered limits. The shell compatibility exception can be removed when OpenShell guarantees that every exec and connect process starts under enforced caps or exposes a fail-closed resource-limit contract.
For custom container launches outside NemoClaw’s managed Docker-driver onboarding path, set hard nproc and nofile limits at the container runtime when you require fail-closed enforcement.
Deep Agents Thread Auto-Approval Capability
Managed Deep Agents sandboxes separate the host-configured capability from the active approval state of each TUI thread.
The default disabled mode keeps the TUI auto-approval choice and dcode -y unavailable.
An operator can select thread-opt-in through a named transactional rebuild, but each thread still requires an explicit TUI choice or dcode -y invocation before tool calls run without further confirmation.
NemoClaw stores the configured mode in a root-owned, mode 0444 image file rather than trusting runtime environment variables.
A missing, malformed, symlinked, writable, unreadable, or incorrectly owned capability file resolves to disabled.
Ambient NEMOCLAW_DCODE_AUTO_APPROVAL* values cannot enable the capability.
When a thread activates auto-approval, the TUI shows the upstream active-state indicator and prints a warning.
Deep Agents Code preserves its native approval state across /clear, /force-clear, thread switch or resume, and agent switch operations.
A new process uses the native startup mode, while NemoClaw forces Manual when the sandbox capability is disabled.
The host-side status command reports only the configured capability because it does not attest to the current state of a specific TUI thread.
Treat thread-opt-in as permission for unattended shell execution inside the sandbox, not as a policy bypass.
The sandbox boundary limits where commands run and what external resources they can reach, but it does not make an automatically approved command harmless to writable workspace data.
Headless Deep Agents Approval Boundary
Interactive dcode sessions keep destructive tools behind the Deep Agents Code approval UI.
Headless dcode -n is an explicit automation boundary with no approval UI.
The managed headless path automatically approves non-shell tool requests such as file writes and edits, while still disabling shell execution, startup commands, interpreter tool calling, executable hooks, unmanaged MCP files, nested remote sandboxes, remote async subagents, and alternate model routes.
Non-Root User
The stock Deep Agents image starts as sandbox.
An image from the managed-image publication workflow also starts as sandbox.
PATH Hardening
The entrypoint locks the PATH environment variable to system directories, preventing the agent from injecting malicious binaries into command resolution.
Build Toolchain Removal
The Dockerfile removes compilers and network probes from the runtime image.
Image Digest Pinning
The managed blueprint references the sandbox image by an immutable @sha256: digest instead of a mutable tag such as :latest.
A registry-side tag change cannot silently select another managed sandbox image.