NVIDIA / NVIDIA/NemoClaw

[Ubuntu 24.04][Inference] inference set exits 0 after failing to read the sandbox openclaw config

Open
#9,104 0 comments 0 reactions 1 assignee Claimed by @rsliter View on GitHub
area: cli integration: openclaw platform: ubuntu
Dominant language
TypeScript
Stars
22.5k
Forks
3.1k
Avg merge
1d 1h
Merged PRs (30d)
715

Description

## Description

nemoclaw inference set can print "Cannot read openclaw config ... Is the sandbox
running?" and still exit with code 0. The model is not switched, but any caller
checking $? sees success.

The message is also inaccurate: the sandbox is Phase Ready at the time, and the
same file is readable from inside the container seconds earlier and later.
The failure appears to be a race against sandbox readiness rather than a genuinely
missing container - retrying the identical command about a minute later succeeds.

This is the same exit-code contract that GitHub issue #6302 fixed for the
OpenShell route-update path. This report is a different sub-path of the same
command: the sandbox-side openclaw config read, which still exits 0 on failure.

Impact: the failure is silent to scripts and to any operator reading exit codes.
While investigating an unrelated test, this bug caused a model switch to be
silently skipped; the sandbox kept serving the previous model and the resulting
agent failure looked like a model defect until the exit code was inspected by hand.

Platform scope: Reproduced on Ubuntu 24.04 x86_64 only; other platforms not tested.
Regression: Unknown - possibly a re-appearance of the exit-code contract fixed for
the route-update path in GitHub issue #6302, but on a different sub-path that may
never have been covered.

## Environment

```text
Device: Ubuntu 24.04 server with NVIDIA A100-SXM4-40GB
OS: Ubuntu 24.04.4 LTS
Architecture: x86_64
Node.js: v22.23.1
npm: 10.9.8
Docker: 29.5.2
OpenShell CLI: openshell 0.0.101
NemoClaw: v0.0.108
OpenClaw: 2026.7.1
```

## Steps to Reproduce

```text
1. Onboard a sandbox named test-sb with the NVIDIA Endpoints provider and confirm
it reports Phase: Ready.
2. Run a model switch and capture the exit code explicitly:
nemoclaw inference set --model nvidia/nemotron-3-nano-omni-30b-a3b-reasoning \
--provider nvidia-prod --sandbox test-sb --no-verify
echo "exit=$?"
3. Run nemoclaw test-sb status and compare the reported model against the one just
requested.
4. Re-run the identical command from step 2 about a minute later.
```

## Expected Result

Either the switch succeeds and the command exits 0, or the switch fails and the
command exits non-zero.

If the sandbox is genuinely not ready yet, the message should say so accurately and
the command should still exit non-zero so callers can detect it.

## Actual Result

```text
The command reports a failure and exits 0:

Cannot read openclaw config (/sandbox/.openclaw/openclaw.json).
Is the sandbox running?
Start the sandbox and retry.
exit=0

The model is not switched. nemoclaw test-sb status continues to report the previous
model. Meanwhile the sandbox is running normally - Phase: Ready - and the same file
is readable from inside it:

nemoclaw test-sb exec -- jq -r '.agents.defaults.model.primary' \
/sandbox/.openclaw/openclaw.json
inference/nvidia/llama-3.3-nemotron-super-49b-v1

Re-running the identical command about a minute later succeeds:

Setting OpenShell inference route: nvidia-prod / nvidia/llama-3.3-nemotron-super-49b-v1
Context window for 'nvidia/llama-3.3-nemotron-super-49b-v1': 131072 tokens
Syncing OpenClaw model identity in sandbox 'test-sb'...
Inference route synced for 'test-sb': inference/nvidia/llama-3.3-nemotron-super-49b-v1

Observed twice in one session.
```

## Logs

```text
Cannot read openclaw config (/sandbox/.openclaw/openclaw.json).
Is the sandbox running?
Start the sandbox and retry.
exit=0
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.