NemoClaw icon indicating copy to clipboard operation
NemoClaw copied to clipboard

Non-interactive `nemoclaw onboard --resume` defaults to `build` provider, ignoring registered `ollama-local` sandbox

Open camerono opened this issue 7 months ago • 3 comments

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:

  1. The destroyed sandbox's previously-recorded provider in sandboxes.json and the recovered inventory shown by nemoclaw list,
  2. The provider field in ~/.nemoclaw/onboard-session.json (which is null after 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

  1. Onboard a sandbox with ollama-local provider:
    NEMOCLAW_PROVIDER=ollama NEMOCLAW_MODEL=hermes3:8b \
    NEMOCLAW_NON_INTERACTIVE=1 nemoclaw onboard
    
  2. Trigger a rebuild that 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).
  3. Without setting NEMOCLAW_PROVIDER, run:
    NEMOCLAW_NON_INTERACTIVE=1 nemoclaw onboard --resume
    
  4. 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.
    
  5. Expected: resume should pick up provider: ollama-local from the registry's recovered inventory (or the prior onboard-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

camerono avatar Apr 30 '26 01:04 camerono

Suggested fixes

  1. In non-interactive --resume, prefer (in order): explicit NEMOCLAW_PROVIDER env, recovered inventory provider for the named sandbox, last onboard-session.json provider, then default build. That promotes the recovered inventory above the hard-coded default.
  2. Improve the error message so users who hit this know about NEMOCLAW_PROVIDER and the user-facing aliases. Today the message only mentions NVIDIA_API_KEY / NEMOCLAW_PROVIDER_KEY, neither of which is the right lever for ollama-local.
  3. 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 to build" 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.

camerono avatar Apr 30 '26 01:04 camerono

✨ 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.

wscurran avatar Apr 30 '26 14:04 wscurran

✨ 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.

wscurran avatar Apr 30 '26 14:04 wscurran