sandbox status reports an unregistered sandbox as registered, with recovery guidance for the wrong problem
What happened?
nemoclaw sandbox status <name> states the opposite of the truth when the local
registry does not hold <name>. It reports that the sandbox is registered
locally, then prints three lines of recovery guidance for a different problem:
waiting for the OpenShell gateway to reconnect, and reassurance about a registry
entry that does not exist.
nemoclaw sandbox stop <name> and nemoclaw sandbox start <name> answer the same
question correctly for the same name in the same run, so the CLI contradicts itself
about one registry.
This is on a documented automation path. docs/reference/commands.mdx:1931 says:
The alias form
nemoclaw <name> status --jsonrequires the sandbox to be registered locally; the canonical formnemoclaw sandbox status <name> --jsonis the one to use from automation that may run against an unknown sandbox name, since it still emits a JSON document withfound: falseinstead of a text error.
So the form the docs direct at unknown sandbox names is the one that answers, in text mode, that the name is registered.
Steps to reproduce
- Have a NemoClaw gateway that is up and connected, with no sandbox named
not-a-sandboxin the local registry. - Run each of the following:
nemoclaw sandbox status not-a-sandbox
nemoclaw sandbox stop not-a-sandbox
nemoclaw not-a-sandbox status
Actual output
########## nemoclaw sandbox status not-a-sandbox ##########
Sandbox 'not-a-sandbox' is registered locally, but is not present in the live OpenShell gateway.
No local registry entry was removed by this status check.
Retry `nemoclaw not-a-sandbox status` after the gateway finishes reconnecting.
If the sandbox was intentionally deleted, run `nemoclaw list` to inspect the remaining sandboxes or `nemoclaw onboard` to create a new one.
EXIT=1
########## nemoclaw sandbox stop not-a-sandbox ##########
Sandbox 'not-a-sandbox' is not registered. Run 'nemoclaw list' to see registered sandboxes.
EXIT=1
########## nemoclaw not-a-sandbox status ##########
Sandbox 'not-a-sandbox' does not exist.
Run 'nemoclaw onboard' to create one.
EXIT=1
The registry held no sandbox at all during this run.
Expected output
nemoclaw sandbox status <unregistered-name> reports that the sandbox is not
registered, using the sentence sandbox start and sandbox stop already print:
Sandbox 'not-a-sandbox' is not registered. Run 'nemoclaw list' to see registered sandboxes.
The exit code stays 1, and nemoclaw sandbox status <name> --json keeps reporting
"found": false.
Root cause
src/lib/actions/sandbox/status-lookup-rendering.ts
- Line 39-41: the
"missing"gateway-lookup case callsprintMissingLiveSandboxStatusGuidance(...)and thenprocess.exit(1). - Line 77-98: that function never consults the registry. Line 83 asserts
is registered locallyunconditionally.
Nothing else fills the gap. printSandboxDetails
(src/lib/actions/sandbox/status-text.ts:351) returns { exitCode: null } and prints
nothing when the registry entry is absent, so the false sentence is the entire text
answer the user gets.
The nemoclaw <name> status alias form does not hit this, because
recoverRequestedSandboxIfNeeded (src/lib/cli/public-dispatch.ts:268) checks the
registry first. The sandbox namespace form skips that guard:
NATIVE_OCLIF_NAMESPACES (src/lib/cli/public-dispatch.ts:43) routes
nemoclaw sandbox ... straight to oclif at line 505, before dispatchNormalizedArgv
runs.
Note that extending that guard to the sandbox namespace is not the right fix: the
guard prints a text error and exits 1 with no --json awareness, so it would remove the
"found": false JSON contract that docs/reference/commands.mdx:1931 promises.
Impact
- Automation and users following
docs/reference/commands.mdx:1931get a wrong-cause diagnostic for a typo or a stale sandbox name. - The suggested recovery ("retry after the gateway finishes reconnecting") can never succeed, because the gateway is not the problem.
- No
Did you mean:suggestion is offered, even thoughsuggestSandboxNamealready exists and the alias form already uses it.
Exit code is already correct (1), so this is a diagnostic-accuracy defect, not a
scripting-contract break.
Related but different
- #8737 (open) is the case where a genuinely registered sandbox is absent from the live gateway after a post-interrupt re-onboard. The current message is correct there, and this report does not change that path.
- #8848 ("fix(cli): report stopped sandboxes truthfully") is the same defect class — the CLI stating a sandbox state that is not true — already accepted and merged.
- The same unconditional sentence also appears in
gateway-state.ts:736(ensureLiveSandboxOrExit, which frontssandbox execandsandbox skill install),snapshot.ts:774, andrebuild-flow-helpers.ts:228. Those are separate commands with separate owning scenarios and are better handled in their own change.
Environment
- NemoClaw commit
7d516f2ed("test: migrate remaining test loops (#9402)") - macOS (darwin 25.5.0), Node.js 22
- Reproduced against a stub
openshellonNEMOCLAW_OPENSHELL_BINthat reports a healthy, connectednemoclawgateway and answers everysandbox getwithNotFound, with an emptyHOMEso the local registry is empty.