Skip to content

[Linux][Sandbox] nemoclaw-start.sh: invalid NEMOCLAW_CONTEXT_WINDOW / NEMOCLAW_MAX_TOKENS causes hard exit instead of graceful skip #2762

@hulynn

Description

@hulynn

Description

Description

PR #2700 (fix(entrypoint): gracefully skip invalid overrides instead of hard-exit) changed 5 non-security-critical
environment variable validations in nemoclaw-start.sh from return 1 to return 0. However, automated testing on
NemoClaw v0.0.31 found that NEMOCLAW_CONTEXT_WINDOW and NEMOCLAW_MAX_TOKENS with invalid values still cause the
container to exit with code 1, killing the sandbox before CMD runs.
Environment
Device:        testnemoclaw (x86_64 CPU server)
OS:            Ubuntu 24.04
Architecture:  x86_64
Node.js:       v22.22.2
npm:           10.x
Docker:        Docker CE 27.x
OpenShell CLI: 0.0.36
NemoClaw:      v0.0.31
OpenClaw:      2026.4.24
Steps to Reproduce
1. Install NemoClaw v0.0.31, onboard a sandbox
2. Run the sandbox with an invalid NEMOCLAW_CONTEXT_WINDOW:
   docker run --rm -e NEMOCLAW_CONTEXT_WINDOW=notanumber 
3. Observe exit code
4. Repeat with NEMOCLAW_MAX_TOKENS=notanumber
Expected Result
Container starts normally (exit 0). Console prints warning:
  [SECURITY] NEMOCLAW_CONTEXT_WINDOW: invalid integer — skipping override
Sandbox continues running.
Actual Result
Container exits immediately with code 1. Sandbox is killed before CMD runs.
Same behavior for NEMOCLAW_MAX_TOKENS=notanumber — EXIT:1.
Logs
Discovered by Agentic QA Pipeline automated vitest execution.
Test file: T5941982-runtime-model-override-via-environment-variables.test.ts
8 tests total, 2 tests confirm the bug:
  - NEMOCLAW_CONTEXT_WINDOW=notanumber → EXIT:1 (expected EXIT:0)
  - NEMOCLAW_MAX_TOKENS=notanumber → EXIT:1 (expected EXIT:0)

Related PR: https://github.com/NVIDIA/NemoClaw/pull/2700

Bug Details

Field Value
Priority Unprioritized
Action Dev - Open - To fix
Disposition Open issue
Module Machine Learning - NemoClaw
Keyword NemoClaw, NEMOCLAW_GH_SYNC_APPROVAL, NemoClaw_Sandbox

[NVB#6130527]

Metadata

Metadata

Assignees

Labels

NV QABugs found by the NVIDIA QA Teamarea: sandboxOpenShell sandbox lifecycle, runtime, config, or recoveryplatform: containerAffects Docker, containerd, Podman, or imagesplatform: ubuntuAffects Ubuntu Linux environments

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions