[Brev][Onboard] post-interrupt re-onboard succeeds with "Deployment verified" but nemoclaw status reports sandbox not in live gateway
- Dominant language
- TypeScript
- Stars
- 22.5k
- Forks
- 3.1k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 715
Description
## Description
After interrupting `nemoclaw onboard` mid-flow (SIGINT at step `[3/8] Configuring inference`) and re-running onboard, the re-onboard completes successfully and prints `Deployment verified — gateway, dashboard, and inference route are healthy.` However, immediately running `nemoclaw {sandbox} status` fails with *"registered locally, but is not present in the live OpenShell gateway."*
**Root cause (source-code confirmed):** the interrupted onboard leaves the gateway process alive on port `8080`. The re-onboard detects port `8080` is occupied and starts a new gateway on port `8082` (`Active gateway set to 'nemoclaw-8082'` in the output). The onboard verification passes against port `8082`, but the local sandbox registry entry is written with the **default** gateway port (`8080`). When `status` later reads the registry and queries port `8080`, the sandbox is absent from that gateway, producing the false *"not in live gateway"* error.
**Platform scope:** Reproduced on Brev only; other platforms not tested. The underlying gateway port-switchover path is platform-generic and may reproduce on any Linux host where the interrupted gateway process holds port `8080` during re-onboard.
**Regression:** Unknown — this specific recovery path was not previously covered by automated tests.
## Environment
```text
Device: Brev cloud VM (4 vCPU / 16 GiB RAM, GCP, CPU-only)
OS: Ubuntu (x86_64)
Architecture: x86_64
Node.js: v22.23.2
npm: 10.9.8
Docker: 29.6.2
OpenShell CLI: openshell 0.0.85
NemoClaw: v0.0.105
OpenClaw: 2026.7.1
```
## Steps to Reproduce
1. On a Brev VM with nemoclaw v0.0.105 installed, run:
```bash
NEMOCLAW_SANDBOX_NAME={sandbox} nemoclaw onboard --non-interactive
```
2. When step `[3/8] "Configuring inference"` appears, send SIGINT (Ctrl+C). Wait ~8 seconds; the gateway process remains alive on port `8080`.
3. Re-run onboard:
```bash
NEMOCLAW_SANDBOX_NAME={sandbox} nemoclaw onboard --non-interactive
```
Observe that onboard completes, prints `Active gateway set to 'nemoclaw-8082'`, then `Deployment verified — gateway, dashboard, and inference route are healthy.`
4. Immediately run:
```bash
nemoclaw {sandbox} status
```
## Expected Result
Status reports the sandbox as Ready with Provider and Model populated, consistent with the `Deployment verified` message printed by re-onboard.
## Actual Result
```text
Active gateway set to 'nemoclaw'
Sandbox-scoped status for '{sandbox}':
Sandbox: {sandbox}
Model: unknown
Provider: unknown
Inference: not verified (gateway/sandbox state not verified)
...
Sandbox '{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 {sandbox} status` after the gateway finishes reconnecting.
```
## Logs
```text
Re-onboard output (relevant excerpt):
[4/8] Creating sandbox
Dashboard is live
Sandbox '{sandbox}' created
Active gateway set to 'nemoclaw-8082'
[7/8] Setting up OpenClaw inside sandbox
OpenClaw gateway launched inside sandbox
[8/8] Policy presets
Deployment verified — gateway, dashboard, and inference route are healthy.
OpenClaw is ready
Sandbox: {sandbox}
Model: /
Subsequent status call:
Active gateway set to 'nemoclaw'
Sandbox '{sandbox}' is registered locally, but is not present in the live OpenShell gateway.
```
Contributor guide
Research direction
Trace the `nemoclaw onboard` gateway port-switching path and the local sandbox registry used by `nemoclaw {sandbox} status`; the issue does not name source files or tests. Reproduce the interrupted re-onboard flow, then add coverage for an active gateway on port 8082 and verify that status reports the sandbox as Ready against that gateway.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100