[All Platforms][CLI&UX] Ctrl-C at the onboard agent-selection prompt exits 0 instead of a non-zero interrupt code
- Dominant language
- TypeScript
- Stars
- 22.5k
- Forks
- 3.1k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 715
Description
## Description
Pressing Ctrl-C at the interactive agent-selection prompt of `nemoclaw onboard` makes the command exit **0**. A cancelled onboarding is therefore indistinguishable from a successful one by exit code, so any script or CI wrapper that branches on the exit status treats the interrupted run as a success.
The CLI already implements the intended behaviour at other prompts: interrupting the credential prompt reports the conventional interrupt exit code 130 (see #9121). The agent-selection prompt is the outlier.
No partial state is left behind: no sandbox is created and `nemoclaw list` stays clean. Only the exit code is wrong.
Platform scope: All Platforms -- originally reproduced on DGX Station GB300 (Ubuntu 24.04, aarch64) at the agent-selection prompt; two additional trigger points (interrupt during sandbox creation, and a correctly-refused rerun) were independently reproduced on a different DGX Station and filed as NVBug 6751725. Root cause is CLI-layer exit-code/signal handling on onboard interrupt and refusal paths with no platform/hardware dependency; expected to reproduce identically on any platform.
Regression: Unknown — earlier versions not tested.
OpenShell issue: No
## Environment
```text
Device: DGX Station GB300
OS: Ubuntu 24.04.4 LTS
Architecture: aarch64
Node.js: v22.23.2
npm: 10.9.8
Docker: Docker version 29.2.1, build a5c7197
OpenShell CLI: openshell 0.0.106
NemoClaw: v0.0.119
OpenClaw: N/A (onboarding cancelled before sandbox creation)
```
## Steps to Reproduce
1. On a host with NemoClaw v0.0.119 installed, clear any resumable session:
```bash
rm -f ~/.nemoclaw/onboard-session.json ~/.nemoclaw/onboard.lock
```
2. Start an interactive onboarding in a real terminal:
```bash
nemoclaw onboard --name cancel-probe
```
3. Wait for the prompt block that begins with `Select your agent:`.
4. Press Ctrl-C before choosing an agent.
5. Read the exit status:
```bash
echo $?
```
## Expected Result
The interrupted run exits with a non-zero status. The conventional interrupt code is 130, which is what the same CLI already reports when the credential prompt is interrupted, so a wrapper can tell "the user cancelled" apart from "onboarding finished".
## Actual Result
The command exits 0.
Measured with a controlling pseudo-terminal so the keystroke is delivered exactly as a user types it, the child process terminates normally with status 0:
```text
CTRL_C_SENT=True
WIFEXITED=True EXITSTATUS=0
WIFSIGNALED=False TERMSIG=n/a
RAW_WAIT_STATUS=0
```
Delivering a real SIGINT to the same process at the same prompt behaves correctly and is reported as a signal termination:
```text
mode=ctrlc WIFEXITED=True EXIT=0 WIFSIGNALED=False TERMSIG=-
mode=signal WIFEXITED=False EXIT=- WIFSIGNALED=True TERMSIG=2
```
So the prompt is in raw mode and consumes the interrupt keystroke as an ordinary cancel key, after which onboarding returns success.
The last output before the interrupt:
```text
Select your agent:
1) OpenClaw — Gateway-based AI agent with plugin ecosystem (openclaw.ai)
2) Hermes Agent — Self-improving AI agent with learning loop (Nous Research)
3) LangChain Deep Agents Code — Terminal coding agent built on the Deep Agents SDK
Choose [1]:
```
After the interrupt, `nemoclaw list` exits 0 and reports no sandbox, confirming that nothing was created.
## Logs
Not captured — the failure is the process exit status, reproduced above with the raw wait status.
Contributor guide
Research direction
Start at the TypeScript CLI entry point for `nemoclaw onboard` and trace how the agent-selection prompt handles Ctrl-C, comparing it with the credential prompt behavior described in #9121. Reproduce the interaction in a real terminal or pseudo-terminal, then verify that cancelling at agent selection returns a non-zero status, conventionally 130, without creating a sandbox.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 70/100