NemoClaw icon indicating copy to clipboard operation
NemoClaw copied to clipboard

[Linux][CLI&UX] nemoclaw onboard --resume: pressing Enter at resource profile prompt rejects empty input instead of applying the displayed [6] default

Open jason-ma-nv opened this issue 6 months ago • 0 comments

Description

During nemoclaw onboard --resume, the "Resource profiles" step prompts Choose [6]: where 6 is the displayed default ("No profile (OpenShell defaults)"). Pressing Enter to accept the default fails immediately with:

Invalid resource profile selection ''. Choose a number from 1 to 6.

and exits the onboarder. The user has to type 6 explicitly to match what [6] advertises.

Root cause is upstream of the resource-profile prompt: promptOrDefault in src/lib/onboard/prompt-helpers.ts:40-53 only substitutes defaultValue when isNonInteractive() is true. In interactive mode it returns the raw deps.prompt() result, which is the empty string on bare Enter. The bracketed default shown in every prompt label is decorative; no interactive caller ever gets it back.

This affects every interactive caller of promptOrDefault, not just resource profile — the resource-profile path is just the first one that hard-rejects an empty answer.

Reproduction Steps

  1. On any Linux host, run nemoclaw onboard --resume (or nemoclaw onboard from scratch).
  2. Get through preflight, gateway, and inference setup.
  3. At the "Resource profiles" menu, press Enter without typing anything.
  4. Observe Invalid resource profile selection ''. Choose a number from 1 to 6. and a non-zero exit.

Workaround: type 6 explicitly.

Expected Result

Enter at Choose [6]: applies the displayed default (6 — No profile / OpenShell defaults) and onboarding proceeds. Any other promptOrDefault(... [N]:) call should likewise honor the shown default on bare Enter.

Actual Result

  Resource profiles:
    1) creator (cpu=50%, ram=50%)
    2) gamer (cpu=25%, ram=25%)
    3) game-developer (cpu=60%, ram=60%)
    4) developer (cpu=75%, ram=75%)
    5) custom (enter values manually)
    6) No profile (OpenShell defaults)
  Choose [6]:
  Invalid resource profile selection ''. Choose a number from 1 to 6.

Exit code non-zero; onboarder terminates.

Environment

  • OS: Linux (glibc 2.31 — likely Ubuntu 20.04)
  • Container runtime: Docker (compatibility gateway path active — glibc < 2.39 triggered the Docker-driver gateway)
  • Reporter user: local-susanl (uid != 0)
  • Mode: nemoclaw onboard --resume
  • Provider: nvidia-prod / nvidia/nemotron-3-super-120b-a12b

Logs

Excerpt from the failing onboard run:

[5/8] Messaging channels
--------------------------------------------------

Available messaging channels:
  [1] ✗ telegram  Telegram bot messaging
  [2] ✗ discord  Discord bot messaging
  [3] ✗ wechat   WeChat (personal) bot messaging
  [4] ✗ slack    Slack bot messaging
  [5] ✗ whatsapp WhatsApp Web messaging (QR pairing)

Press 1-5 to toggle, Enter when done:
Skipping messaging channels.
Sandbox name (1-63 characters, lowercase, starts with a letter, letters/numbers/internal hyphens only, ends with letter/number) [my-assistant]:

Resource profiles:
  1) creator (cpu=50%, ram=50%)
  2) gamer (cpu=25%, ram=25%)
  3) game-developer (cpu=60%, ram=60%)
  4) developer (cpu=75%, ram=75%)
  5) custom (enter values manually)
  6) No profile (OpenShell defaults)
Choose [6]:
Invalid resource profile selection ''. Choose a number from 1 to 6.

Code Pointers

  • src/lib/onboard/prompt-helpers.ts:40-53 — promptOrDefault never applies defaultValue in interactive mode.
  • src/lib/onboard/resource-profile-selection.ts:89-99 — first caller that hard-rejects the resulting empty string.

Suggested fix shape (minimum-viable): in interactive mode, after deps.prompt(question), return defaultValue if the reply is empty/whitespace.

Checklist

  • [x] I confirmed this bug is reproducible
  • [x] I searched existing issues and this is not a duplicate

jason-ma-nv avatar May 28 '26 02:05 jason-ma-nv