Description
On Ubuntu 24.04 with NemoClaw v0.0.54, nemoclaw onboard in non-interactive Ollama mode correctly detects an unsupported NEMOCLAW_NON_INTERACTIVE_SUDO_MODE value of silent and prints the expected error message, but it exits with status code 0 instead of 1. This makes automation and CI scripts treat the failure as success, while the same code path for force exits with code 1 as intended.
Environment
- Device: Ubuntu 24.04 server
- OS: Ubuntu 24.04
- Architecture: x86_64
- Node.js: v22.22.3
- npm: 10.9.8
- Docker: Docker version 29.2.1, build a5c7197
- OpenShell CLI: openshell 0.0.44
- NemoClaw: v0.0.54
- OpenClaw: OpenClaw 2026.5.22 (a374c3a)
Steps to Reproduce
-
Ensure Ollama is installed and active: systemctl status ollama shows active and Docker is running.
-
Confirm no sandbox named sudo-mode-invalid-test exists: nemoclaw list | grep sudo-mode-invalid-test returns empty.
-
Set non-interactive env vars:
export NEMOCLAW_NON_INTERACTIVE=1
export NEMOCLAW_NON_INTERACTIVE_SUDO_MODE=silent
export NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE=1
export NEMOCLAW_PROVIDER=install-ollama
-
Run onboarding and capture logs:
nemoclaw onboard --name sudo-mode-invalid-test 2>&1 | tee /tmp/onboard-invalid-sudo.log
echo "EXIT:$?"
-
Search for the sudo-mode error line:
grep 'NEMOCLAW_NON_INTERACTIVE_SUDO_MODE' /tmp/onboard-invalid-sudo.log
-
Verify that no sandbox was created:
docker ps -a | grep openshell
nemoclaw list | grep sudo-mode-invalid-test
-
As a control, repeat with force (shows correct exit code 1):
export NEMOCLAW_NON_INTERACTIVE_SUDO_MODE=force
nemoclaw onboard --name sudo-mode-invalid-test2 2>&1; echo "EXIT:$?"
-
As a valid case, repeat with prompt (succeeds and creates a sandbox):
export NEMOCLAW_NON_INTERACTIVE_SUDO_MODE=prompt
nemoclaw onboard --name sudo-mode-prompt-test 2>&1 | tee /tmp/onboard-prompt.log
echo "EXIT:$?"
Expected Result
For any unsupported NEMOCLAW_NON_INTERACTIVE_SUDO_MODE value (e.g. silent, force):
-
nemoclaw onboard should print:
Unsupported NEMOCLAW_NON_INTERACTIVE_SUDO_MODE value: <value>. Use 'prompt' or leave it unset.
-
Onboarding should stop before gateway/sandbox creation or any Ollama systemd changes.
-
The process should exit with status code 1 so automation detects a failure.
-
No new OpenShell containers or sudo-mode-invalid-test sandbox should appear in docker ps -a or nemoclaw list.
For the valid value prompt:
- No "Unsupported NEMOCLAW_NON_INTERACTIVE_SUDO_MODE" error should appear.
- Onboarding should proceed through Ollama/systemd configuration, provider setup, and sandbox creation (or fail later for unrelated reasons).
Actual Result
With NEMOCLAW_NON_INTERACTIVE_SUDO_MODE=silent
export NEMOCLAW_NON_INTERACTIVE=1
export NEMOCLAW_NON_INTERACTIVE_SUDO_MODE=silent
export NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE=1
export NEMOCLAW_PROVIDER=install-ollama
nemoclaw onboard --name sudo-mode-invalid-test 2>&1 | tee /tmp/onboard-invalid-sudo.log
echo "EXIT:$?"
[non-interactive] Agent: OpenClaw
NemoClaw Onboarding (non-interactive mode)
===================
[1/8] Preflight checks
──────────────────────────────────────────────────
✓ Docker is running
✓ Docker can start bridge containers
✓ Container DNS resolution works
✓ Container runtime: docker
✓ Container runtime resources: 16 vCPU / 251.4 GiB
✓ openshell CLI: openshell 0.0.44
✓ Port 8080 already owned by healthy NemoClaw runtime (OpenShell gateway)
✓ NVIDIA GPU detected (NVIDIA GeForce RTX 5090, 32607 MB)
✓ Docker CDI GPU support detected (/etc/cdi/nvidia.yaml, /run/cdi/nvidia.yaml)
✓ Sandbox GPU: enabled (auto)
✓ Memory OK: 257441 MB RAM + 0 MB swap
NVIDIA GPU detected; enabling OpenShell GPU passthrough. Use --no-gpu to opt out.
[2/8] Starting OpenShell gateway
──────────────────────────────────────────────────
[reuse] Skipping gateway (running)
Reusing healthy NemoClaw gateway.
[3/8] Configuring inference provider
──────────────────────────────────────────────────
[non-interactive] Provider: ollama
Configuring Ollama systemd loopback override...
Applying an Ollama systemd override (OLLAMA_HOST=127.0.0.1:11434).
The next steps use sudo to write the drop-in, reload systemd, and restart
the service; you may be prompted for your password.
Unsupported NEMOCLAW_NON_INTERACTIVE_SUDO_MODE value: silent. Use 'prompt' or leave it unset.
EXIT:0 ← should be 1
-
grep 'NEMOCLAW_NON_INTERACTIVE_SUDO_MODE' /tmp/onboard-invalid-sudo.log returns:
Unsupported NEMOCLAW_NON_INTERACTIVE_SUDO_MODE value: silent. Use 'prompt' or leave it unset.
-
docker ps -a | grep openshell; nemoclaw list | grep sudo-mode-invalid-test shows nothing (no sandbox created).
-
Exit code is 0, even though onboarding printed an error and stopped early.
With NEMOCLAW_NON_INTERACTIVE_SUDO_MODE=force (control)
export NEMOCLAW_NON_INTERACTIVE_SUDO_MODE=force
nemoclaw onboard --name sudo-mode-invalid-test2 2>&1; echo "EXIT:$?"
[non-interactive] Agent: OpenClaw
...
Unsupported NEMOCLAW_NON_INTERACTIVE_SUDO_MODE value: force. Use 'prompt' or leave it unset.
EXIT:1
- Message is identical (unsupported value).
- Exit code is correctly 1.
With NEMOCLAW_NON_INTERACTIVE_SUDO_MODE=prompt (valid)
export NEMOCLAW_NON_INTERACTIVE_SUDO_MODE=prompt
nemoclaw onboard --name sudo-mode-prompt-test 2>&1 | tee /tmp/onboard-prompt.log
echo "EXIT:$?"
[non-interactive] Agent: OpenClaw
NemoClaw Onboarding (non-interactive mode)
===================
[1/8] Preflight checks
...
[2/8] Starting OpenShell gateway
...
[3/8] Configuring inference provider
...
✓ Using Ollama on localhost:11434 (proxy on :11435)
Loading Ollama model: qwen2.5:7b
Chat Completions API available — OpenClaw will use openai-completions.
✓ Using Ollama runtime context length: 32768 tokens
...
[4/8] Setting up inference provider
...
[6/8] Creating sandbox
...
- No "Unsupported NEMOCLAW_NON_INTERACTIVE_SUDO_MODE" error appears.
- Onboarding proceeds to configure inference and build the sandbox image.
Logs
Main CLI logs are captured above under Actual Result (including the full silent and force outputs and the key excerpt from the prompt run).
No additional gateway or system logs were captured for this specific exit-code issue.
Description
On Ubuntu 24.04 with NemoClaw v0.0.54,
nemoclaw onboardin non-interactive Ollama mode correctly detects an unsupportedNEMOCLAW_NON_INTERACTIVE_SUDO_MODEvalue ofsilentand prints the expected error message, but it exits with status code 0 instead of 1. This makes automation and CI scripts treat the failure as success, while the same code path forforceexits with code 1 as intended.Environment
Steps to Reproduce
Ensure Ollama is installed and active:
systemctl status ollamashows active and Docker is running.Confirm no sandbox named
sudo-mode-invalid-testexists:nemoclaw list | grep sudo-mode-invalid-testreturns empty.Set non-interactive env vars:
Run onboarding and capture logs:
Search for the sudo-mode error line:
grep 'NEMOCLAW_NON_INTERACTIVE_SUDO_MODE' /tmp/onboard-invalid-sudo.logVerify that no sandbox was created:
As a control, repeat with
force(shows correct exit code 1):As a valid case, repeat with
prompt(succeeds and creates a sandbox):Expected Result
For any unsupported
NEMOCLAW_NON_INTERACTIVE_SUDO_MODEvalue (e.g.silent,force):nemoclaw onboardshould print:Onboarding should stop before gateway/sandbox creation or any Ollama systemd changes.
The process should exit with status code 1 so automation detects a failure.
No new OpenShell containers or
sudo-mode-invalid-testsandbox should appear indocker ps -aornemoclaw list.For the valid value
prompt:Actual Result
With
NEMOCLAW_NON_INTERACTIVE_SUDO_MODE=silentgrep 'NEMOCLAW_NON_INTERACTIVE_SUDO_MODE' /tmp/onboard-invalid-sudo.logreturns:docker ps -a | grep openshell; nemoclaw list | grep sudo-mode-invalid-testshows nothing (no sandbox created).Exit code is 0, even though onboarding printed an error and stopped early.
With
NEMOCLAW_NON_INTERACTIVE_SUDO_MODE=force(control)With
NEMOCLAW_NON_INTERACTIVE_SUDO_MODE=prompt(valid)Logs
Main CLI logs are captured above under Actual Result (including the full
silentandforceoutputs and the key excerpt from thepromptrun).No additional gateway or system logs were captured for this specific exit-code issue.