Replies: 1 comment
-
|
The following is based on my understanding, further cross checked by AI. So if there are any issues with the same please feel free to let me know! Always tryna learn and contribute! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
As NemoClaw continues to evolve with powerful new features, I’ve noticed that some of the terminology specifically the 'Shields Up' and 'Shields Down' workflows can be a bit opaque, especially for those newer to the project. This guide aims to simplify these core concepts, explain how they function under the hood, and help everyone get their local environment up! :)
NemoClaw Developer's Survival Guide: Overcoming Sandbox, Policy, and Lifecycle Friction
NVIDIA NemoClaw wraps the OpenClaw autonomous agent framework inside a secure, containerized OpenShell sandbox. This security-first architecture enforces kernel-level sandboxing (via Linux Landlock, seccomp, and network namespaces) to ensure that a compromised agent cannot access host credentials, execute arbitrary binaries, or exfiltrate sensitive data.
However, this tight security layer introduces significant friction for developers who want to write code, test custom tools, or configure integrations without systems engineering overhead.
This survival guide demystifies NemoClaw’s three largest operational hurdles Shields, Rebuilds, and the Local Development Loop and provides a practical, step-by-step developer playbook to keep your workflows moving fast.
1. Demystifying "Shields" (Kernel-Level Configuration Locking)
"Shields" represent a kernel-level file-locking mechanism that prevents a compromised AI agent from rewriting its own instructions ``.
What Shields Actually Do Under the Hood
/sandbox/.openclaw/openclaw.jsonand the.config-hashfile) toroot:rootand drops their permissions to read-only (444). Because the unprivileged AI agent runs strictly as thesandboxuser, it is physically blocked at the OS level from editing its own settings, safeguarding it against prompt injection exploits.sandbox:sandboxand opens permissions to660(read/write). This allows you, or the agent's built-in tool managers, to edit configurations and register new local skills.The Status Display "Vocabulary Desync"
When you query the sandbox status on a fresh installation, the CLI outputs confusing, inconsistent labels for the default configuration state ``:
nemoclaw statusreports:Permissions: shields down``.nemoclaw doctorreports:[warn] Shields: down``.nemoclaw shields statusreports:Shields: NOT CONFIGURED (default mutable state)``.The reality: On a fresh onboard, shields are not actually "lowered"; they were never configured (raised) in the first place
. The agent is running in its default mutable state (660 sandbox:sandbox). The UI mismatch can easily make you panic, thinking your security layer has failed or crashed ``.The Detached Timer "Fail-Open" Security Vulnerability
When you run
nemoclaw shields down --timeout 2m, the CLI spawns a detached Node.js helper process (shields-timer-<sandbox>.js) on the host. This background process acts as a watchdog, waiting for the 2-minute deadline to expire before automatically callingshields upto lock the files back down.If your host machine reboots, runs out of memory (OOM), or the detached Node process is terminated, the auto-restore routine dies with it
. The deadline passes silently, no auto-restore audit entry is written, and your sandbox remains permanently vulnerable in write-mode (660 sandbox:sandbox) without ever throwing an alert on the CLI.Live Policy Transitions Crash on
/procand/home/linuxbrewIf you attempt to lower shields on a running container via
nemoclaw shields down, OpenShell attempts to hot-swap the sandbox's active policy with the permissive policy file (openclaw-sandbox-permissive.yaml) ``.This often crashes with an OpenShell systems validation error ``:
status: InvalidArgument, message: "filesystem read_write path '/proc' cannot be removed on a live sandbox"Because OpenShell forbids removing any declared
read_writefilesystem path on a running sandbox, the permissive policy must be a strict superset of the default policy. If system paths like/procor/home/linuxbreware omitted from the permissive file, the live transition aborts, exiting withCode 1and leaving the developer permanently locked out of editing files on the running container.2. The Rebuild and Policy Loss Nightmare
When you update your agent's code, apply patches, or change underlying packages, you must run
nemoclaw rebuildto destroy the old container, pull the latest image, and restore your work ``. This process has several silent failure points.Rebuild Fails When Shields are UP
If shields are active (
444 root:root), the backup engine insiderebuildattempts to archive your files. Because the host backup routine cannot read files owned byrootwith read-only permissions, the command immediately aborts with a vague error:The container is left untouched, but the upgrade is blocked$\rightarrow$
. To fix this, you must run a manual three-step transition:nemoclaw shields down$\rightarrow$nemoclaw rebuild$\rightarrow$nemoclaw shields up.The Silent Policy Purge and Gateway Cache Desync
When a rebuild finishes, NemoClaw recreates the sandbox and restores files like your workspace, skills, and credentials
. However, network policies do not live inside the sandbox filesystem; they are managed by the host-side gateway proxy.During recreation, the onboarding engine applies only the default network tier presets (e.g., Balanced:
npm,pypi,huggingface,brew,brave). If you previously rannemoclaw policy-add telegramorslack, those custom rules are completely wiped. This triggers two problems:openclaw.jsoninside the sandbox filesystem), but the gateway blocks their outbound traffic. The agent starts up, but any outbound calls toapi.telegram.orgorslack.comare silently dropped with403 Forbiddenerrors.. After a rebuild, runningnemoclaw policy-listwill show thattelegramis unapplied (○ telegram), yet the bot continues to receive and send messages because the gateway has not cleared its cache. The CLI tells you the system is locked down, but the network proxy remains completely open ``.3. How the "Local Dev Loop" is Blocked
NemoClaw is designed to run immutable, highly secured production agents ``. This introduces friction when you are trying to write, test, and iterate on local code.
No Easy Way to Mount Host Code
Because NemoClaw enforces strict file paths, you cannot simply bind-mount a folder of local Python skills or custom TypeScript tools into the container and edit them live .
mounts:schema is being added toopenclaw-sandbox.yaml:[5]. Because OpenShell’s underlying kernel-level Landlock engine cannot hot-swap directory whitelists on a live process, any modification to your mounts requires you to recreate the entire sandbox vianemoclaw onboardorrebuild[6, 5]. Live, dynamic directory mounting is unsupported .Silently Ignored Egress Additions
If you are writing code that interacts with a local service (e.g., a local database or model server on
localhost:8000), you might try extendingblueprint.yamlundercomponents.policy.additions:This parses with zero syntax errors, but due to an unplumbed bug in the runner (
src/blueprint/runner.ts), thepolicy_additionsobject is silently discarded and never sent to OpenShell . Your custom routes are dropped, connection attempts time out, and no diagnostic logs are generated .ClawHub Plugin Validation Symlink Crash
When executing commands inside the sandbox shell to install third-party plugins (e.g.,
openclaw plugins install), the installer resolves, downloads, and extracts the archive, but crashes during path validation :This occurs because NemoClaw symlinks persistent state paths under
~/.openclawto/sandbox/.openclaw-dataon the host to ensure they survive container upgrades[6, 8]. The plugin package manager fails when encountering symlinks instead of physical directories .4. Developer SURVIVAL PLAYBOOK & CHEAT SHEET
Use these concrete recipes to bypass setup errors and maintain a fast development loop.
Recipe 1: Bypassing Local Setup Traps
Step 1: Force a Stable "User-Space" NPM Prefix
To prevent permission blocks and silent
npm linkfailures during local source installation, explicitly configure a local global prefix in your user-space:Step 2: The WSL2 / Docker Desktop Ollama Bind Fix
If running inside WSL2, Docker Desktop is isolated from the Windows loopback address
. If Ollama is running on the Windows host, it binds to127.0.0.1:11434by default, making it unreachable from the container.OLLAMA_HOST=0.0.0.0``.Recipe 2: Auditing Your True Shield Status
Never rely on the CLI status commands alone, as they can return desynced terminology
. Execute this command from the host to check the actual filesystem permissions inside the running container:Refer to the table below to interpret your true security posture:
sandbox:sandbox 660``sandbox:sandboxnemoclaw shields upto secure ``.root:root 444``root:root/procor/home/linuxbrew. Re-onboard ``.Recipe 3: Safe Upgrade and Rebuild Walkthrough
To perform upgrades, pull fresh images, or run
nemoclaw rebuildwithout triggering filesystem backup crashes or dropping custom integration policies, use this workflow:Recipe 4: Working Around the Symlink Plugin Install Bug
If you must install a plugin from ClawHub inside the sandbox shell, bypass the symlink directory validation crash with this directory-swap workaround :
Beta Was this translation helpful? Give feedback.
All reactions