Description
When a raw secret-shaped value (e.g. an API key) is present in
/sandbox/.deepagents/.env, dcode correctly detects it and refuses to
start with the message "dcode: refusing to start — .env contains a
secret-shaped value in OPENAI_API_KEY." However, it returns exit code 0
instead of exit code 2.
This undermines security guardrails — callers checking exit code to
detect secret leaks will miss the rejection.
Platform scope: Reproduced on ubuntu22, ubuntu26-gpu, dgx-station;
other platforms not tested but likely same behavior
(CLI code path is platform-independent).
Regression: Yes — worked in v0.0.73 (exit code 2), broken in v0.0.81
(exit code 0).
Environment
Device: CI runners (Ubuntu 22.04, Ubuntu 26.04, DGX Station)
OS: Ubuntu 22.04 / Ubuntu 26.04 / DGX Station
Architecture: x86_64
Node.js: v22.23.1
npm: 10.9.2
Docker: 29.x
OpenShell CLI: 0.0.72
NemoClaw: v0.0.81
OpenClaw: N/A (dcode agent)
Steps to Reproduce
- Install NemoClaw v0.0.81
- Onboard a dcode sandbox: nemoclaw onboard --agent dcode --name test-dcode --non-interactive
- Write a secret-shaped value to .env:
nemoclaw test-dcode exec -- bash -c 'echo "OPENAI_API_KEY=sk-live-XXXXXXXXXXXXX" > /sandbox/.deepagents/.env'
- Run: nemoclaw test-dcode exec -- bash -c 'dcode -n "Reply with PING." 2>&1; echo "EXITCODE:$?"'
- Observe the exit code
Expected Result
Exit code should be 2 (as observed in v0.0.73 day0 testing).
The rejection message is printed correctly, so the detection logic works
— only the exit code is wrong.
Actual Result
dcode: refusing to start — /sandbox/.deepagents/.env contains a
secret-shaped value in OPENAI_API_KEY.
Remove it from the environment, or use 'nemoclaw credentials' to
register provider keys.
EXITCODE:0
The rejection message is correct but exit code is 0 instead of 2.
Logs
AssertionError: expected 'dcode: refusing to start — /sandbox/...'
to contain 'EXITCODE:2'
- Expected: EXITCODE:2
+ Received: dcode: refusing to start — /sandbox/.deepagents/.env
contains a secret-shaped value in OPENAI_API_KEY.
Remove it from the environment, or use 'nemoclaw credentials'
to register provider keys.
EXITCODE:0
Description
When a raw secret-shaped value (e.g. an API key) is present in
/sandbox/.deepagents/.env, dcode correctly detects it and refuses to
start with the message "dcode: refusing to start — .env contains a
secret-shaped value in OPENAI_API_KEY." However, it returns exit code 0
instead of exit code 2.
This undermines security guardrails — callers checking exit code to
detect secret leaks will miss the rejection.
Platform scope: Reproduced on ubuntu22, ubuntu26-gpu, dgx-station;
other platforms not tested but likely same behavior
(CLI code path is platform-independent).
Regression: Yes — worked in v0.0.73 (exit code 2), broken in v0.0.81
(exit code 0).
Environment
Steps to Reproduce
Expected Result
Exit code should be 2 (as observed in v0.0.73 day0 testing).
The rejection message is printed correctly, so the detection logic works
— only the exit code is wrong.
Actual Result
Logs