Non-interactive `nemoclaw onboard --resume` defaults to `build` provider, ignoring registered `ollama-local` sandbox
Description
When nemoclaw <name> rebuild (or the install.sh upgrade path) destroys an existing sandbox and re-runs nemoclaw onboard --resume in non-interactive mode (NEMOCLAW_NON_INTERACTIVE=1), the provider selection step ignores both:
- The destroyed sandbox's previously-recorded
providerinsandboxes.jsonand the recovered inventory shown bynemoclaw list, - The
providerfield in~/.nemoclaw/onboard-session.json(which isnullafter a rebuild abort),
and defaults to build (NVIDIA Build endpoints), then fails preflight with:
[non-interactive] Provider: build
NVIDIA_API_KEY (or NEMOCLAW_PROVIDER_KEY) is required for NVIDIA Endpoints in non-interactive mode.
For users on ollama-local, this is a UX trap: the same sandbox the user just told the CLI to rebuild in place now demands an API key for a different cloud provider.
The workaround is to set NEMOCLAW_PROVIDER=ollama (note: user-facing name, not the internal ollama-local key — that mismatch is a secondary nit) and NEMOCLAW_MODEL=<model> env vars before invoking onboard --resume. But the user needs to (a) know the env var exists, (b) know the user-facing alias, and (c) know the right model — none of which the error message hints at.
nemoclaw list already knows what the previous provider was (it correctly says provider: ollama-local when called against the recovered inventory). The non-interactive resume should consult that.
Reproduction Steps
- Onboard a sandbox with
ollama-localprovider:NEMOCLAW_PROVIDER=ollama NEMOCLAW_MODEL=hermes3:8b \ NEMOCLAW_NON_INTERACTIVE=1 nemoclaw onboard - Trigger a
rebuildthat completes the destroy step but fails the recreate step (e.g. by hitting an unrelated build error in Step 17, like the bundled-OpenClaw-version mismatch — see bug 1). - Without setting
NEMOCLAW_PROVIDER, run:NEMOCLAW_NON_INTERACTIVE=1 nemoclaw onboard --resume - Observed:
[3/8] Configuring inference (NIM) ────────────────────────────────────────────────── [non-interactive] Provider: build NVIDIA_API_KEY (or NEMOCLAW_PROVIDER_KEY) is required for NVIDIA Endpoints in non-interactive mode. - Expected: resume should pick up
provider: ollama-localfrom the registry's recovered inventory (or the prioronboard-session.json), and continue with the same provider.
Environment
- OS: Ubuntu 24.04 (Linux
6.17.0-1014-nvidia aarch64) - Hardware: NVIDIA GB10 (DGX Spark)
- Docker: Engine 27.x
- Node.js: v22.22.2
- NemoClaw: v0.0.29
- OpenShell: 0.0.36
Debug Output
Output of `nemoclaw debug --quick --sandbox <sandbox>` captured 2026-04-29 18:47 UTC, *after* recovery (i.e., after using `NEMOCLAW_PROVIDER=ollama` to get past the bug). Full capture: [debug-output-2026-04-29-1847.txt](https://github.com/user-attachments/files/27226687/debug-output-2026-04-29-1847.txt). The relevant excerpt is the `Onboard Session` section, showing the post-recovery healthy state with `provider: ollama-local` correctly set:
$ nemoclaw --version
nemoclaw v0.0.29
═══ Onboard Session ═══
{
"version": 1,
"sessionId": "1777482886421-0bhqmqpb",
"status": "complete",
"resumable": false,
"mode": "non-interactive",
"sandboxName": "<sandbox>",
"provider": "ollama-local",
"model": "hermes3:8b",
"endpointUrl": "http://host.openshell.internal:11435/v1",
"credentialEnv": null,
"preferredInferenceApi": "openai-completions",
"policyPresets": ["npm","pypi","huggingface","brew","brave","local-inference"],
"lastStepStarted": "policies",
"lastCompletedStep": "policies",
"failure": null
}
The pre-recovery state (the broken state this bug describes) is captured verbatim in the "Logs" section above — `provider: null`, `lastStepStarted: provider_selection`, `failure.step: provider_selection`. That snapshot was taken from `~/.nemoclaw/onboard-session.json` immediately after the rebuild abort, before re-running with `NEMOCLAW_PROVIDER=ollama`.
Logs
`~/.nemoclaw/onboard-session.json` after the rebuild abort (relevant fields):
{
"status": "failed",
"mode": "non-interactive",
"lastStepStarted": "provider_selection",
"lastCompletedStep": "gateway",
"failure": {
"step": "provider_selection",
"message": "Onboarding exited before the step completed."
},
"agent": null,
"sandboxName": "<sandbox>",
"provider": null,
"model": null,
"endpointUrl": null,
"credentialEnv": null
}
`nemoclaw list` output simultaneously:
Recovered sandbox inventory from the last onboard session.
Sandboxes:
<sandbox> *
model: qwen2.5:14b provider: ollama-local CPU policies: none
(onboarded: model=unknown, provider=unknown)
The fact that the recovered inventory carries `provider: ollama-local` but `--resume` doesn't consult it is the bug.
Checklist
- [x] I confirmed this bug is reproducible
- [x] I searched existing issues and this is not a duplicate
Suggested fixes
- In non-interactive
--resume, prefer (in order): explicitNEMOCLAW_PROVIDERenv, recovered inventory provider for the named sandbox, lastonboard-session.jsonprovider, then defaultbuild. That promotes the recovered inventory above the hard-coded default. - Improve the error message so users who hit this know about
NEMOCLAW_PROVIDERand the user-facing aliases. Today the message only mentionsNVIDIA_API_KEY/NEMOCLAW_PROVIDER_KEY, neither of which is the right lever forollama-local. - Sanity-warn when the chosen default differs from the recovered inventory's provider. Even if (1) isn't taken, surfacing "you previously onboarded with
ollama-local; this resume will switch tobuild" gives the user a fighting chance.
Adjacent UX nit (worth bundling into the same fix or a follow-up): the NEMOCLAW_PROVIDER env var accepts user-facing names (ollama, build, openai, anthropic, anthropicCompatible, gemini, custom, nim-local, vllm) but the registry / nemoclaw list displays the internal key (ollama-local). Users observing provider: ollama-local and trying NEMOCLAW_PROVIDER=ollama-local get Unsupported NEMOCLAW_PROVIDER: ollama-local with the valid list. Either accept both forms or align the displayed name with the env-accepted name.
✨ Thanks for submitting this issue that identifies a bug where the non-interactive 'nemoclaw onboard --resume' command defaults to the 'build' provider, ignoring the registered 'ollama-local' sandbox. This proposes an investigation into the provider selection process during non-interactive onboard resume operations, specifically when using the 'ollama-local' sandbox.
✨ Thanks for submitting this issue that identifies a bug where the non-interactive 'nemoclaw onboard --resume' command defaults to the 'build' provider, ignoring the registered 'ollama-local' sandbox. This proposes an investigation into the provider selection process during non-interactive onboard resume operations, specifically when using the 'ollama-local' sandbox.